From 872b6d921acbe146c7f0c684e7c68e9bfaf08491 Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Mon, 6 Jan 2020 22:06:23 -0500 Subject: [PATCH] Console Log Fix test --- _scripts/start-server | 2 +- _scripts/tribesnext-server-installer | 30 ++++++++++++++++++++-------- docker-compose.yml | 2 ++ 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/_scripts/start-server b/_scripts/start-server index 4bf7adc..1ce5f46 100755 --- a/_scripts/start-server +++ b/_scripts/start-server @@ -21,4 +21,4 @@ chmod +x ${BASE_DIR}tribes2d-lan.dynamic # -- debug -- keep container running and dont launch the server #tail -f /dev/null -/tmp/tribes2/tn_heartbeat & taskset -c 0 ./tribes2d-lan.dynamic 28000 -nologin -dedicated -mod Classic \ No newline at end of file +/tmp/tribes2/tn_heartbeat & taskset -c 0 ./tribes2d-lan-console.dynamic 28000 -nologin -dedicated -mod Classic \ No newline at end of file diff --git a/_scripts/tribesnext-server-installer b/_scripts/tribesnext-server-installer index 23a5a87..15c2e4a 100755 --- a/_scripts/tribesnext-server-installer +++ b/_scripts/tribesnext-server-installer @@ -20,7 +20,7 @@ function get_files { if [ ! -d $INSBASE ] then - mkdir -p $INSBASE/tribes2/Manual + mkdir -p $INSBASE/tribes2/{Manual,console} mkdir -p $INSBASE/tribes2/base/{music,lighting,textures,prefs} mkdir -p $INSBASE/tribes2/Classic/scripts/{turrets,weapons,autoexec,packs,vehicles} mkdir -p $INSBASE/tribes2/Classic/{logs,stats,serverStats} @@ -29,9 +29,10 @@ fi # -- download files -get_files t2-linux.zip "https://www.dropbox.com/s/ejemimzxjdswtvm/" "$TMPBASE" -get_files tribes2-lan-fix-linux.tar.gz "http://t2.plugh.us/" "$TMPBASE" -get_files classic_v152.zip "https://tribes2stats.com/files/mods/" "$TMPBASE" +get_files t2-linux.zip "https://www.dropbox.com/s/ejemimzxjdswtvm/" "$TMPBASE" +get_files tribes2-lan-fix-linux.tar.gz "http://t2.plugh.us/" "$TMPBASE" +get_files classic_v152.zip "https://tribes2stats.com/files/mods/" "$TMPBASE" +get_files tribes2-lan-dynamic-console-fix.tar "https://www.dropbox.com/s/1kf53wi3hycmsyd/" "$TMPBASE" # -- gimme a little time @@ -73,13 +74,26 @@ then cd $INSBASE/tribes2/ xdelta3 decode -s tribes2d.dynamic tribes2-lan-fix-linux.xdelta tribes2d-lan.dynamic chmod 755 tribes2d-lan.dynamic +fi + +# -- install Console fix +echo "Installing Console Log Fix (Linux)..." +# -- run the sh and output the patched file (tribes2d-lan-console.dynamic) +if [ -f $TMPBASE/tribes2-lan-dynamic-console-fix.tar ] +then + mkdir -p $TMPBASE/console-fix + tar -xzvf $TMPBASE/tribes2-lan-dynamic-console-fix.tar -C $TMPBASE/console-fix 2>&1 > /dev/null + cp -r $TMPBASE/console-fix/. $INSBASE/tribes2/. + cd $INSBASE/tribes2/ + xdelta3 decode -s tribes2d-lan.dynamic tribes2-lan-dynamic-console-fix.xdelta tribes2d-lan-console.dynamic + chmod 755 tribes2d-lan-console.dynamic echo "Finished setting up T2!" fi echo "Binding console.log to container logs" -touch console.log -touch $INSBASE/tribes2/console.log -ln -sf /proc/1/fd/1 console.log -ln -sf /proc/1/fd/1 $INSBASE/tribes2/console.log +touch log +touch $INSBASE/tribes2/console/log +ln -sf /proc/1/fd/1 log +ln -sf /proc/1/fd/1 $INSBASE/tribes2/console/log exit 0 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0f9d0ac..dac5758 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -75,6 +75,7 @@ services: - serverStats:/home/gameserv/.loki/tribes2/Classic/serverStats - stats:/home/gameserv/.loki/tribes2/Classic/stats - logs:/home/gameserv/.loki/tribes2/Classic/logs + - console:/home/gameserv/.loki/tribes2/console networks: - t2-net @@ -101,6 +102,7 @@ volumes: serverStats: stats: logs: + console: networks: t2-net: