Compare commits

...

5 Commits

3 changed files with 19 additions and 3 deletions

View File

@@ -130,6 +130,7 @@ else
fi
export WINEARCH=win64
export WINEPREFIX=/serverdata/serverfiles/WINE64
export WINEDEBUG=-all
echo "---Checking if WINE workdirectory is present---"
if [ ! -d ${SERVER_DIR}/WINE64 ]; then
echo "---WINE workdirectory not found, creating please wait...---"
@@ -153,4 +154,11 @@ echo "---Server ready---"
echo "---Start Server---"
cd ${SERVER_DIR}
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine64 ${SERVER_DIR}/ConanSandboxServer.exe -log ${GAME_PARAMS}
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine64 ${SERVER_DIR}/ConanSandboxServer.exe -log ${GAME_PARAMS} >/dev/null 2>&1 &
sleep 2
if [ ! -f ${SERVER_DIR}/ConanSandbox/Saved/Logs/ConanSandbox.log ]; then
mkdir -p ${SERVER_DIR}/ConanSandbox/Saved/Logs 2>/dev/null
touch ${SERVER_DIR}/ConanSandbox/Saved/Logs/ConanSandbox.log 2>/dev/null
fi
/opt/scripts/start-watchdog.sh &
tail -n +0 -f ${SERVER_DIR}/ConanSandbox/Saved/Logs/ConanSandbox.log

View File

@@ -0,0 +1,8 @@
#!/bin/bash
killpid="$(pidof ConanSandboxServer.exe)"
while true
do
tail --pid=$killpid -f /dev/null
kill "$(pidof tail)"
exit 0
done

View File

@@ -26,8 +26,8 @@ chown -R ${UID}:${GID} ${DATA_DIR}
echo "---Starting...---"
term_handler() {
kill -SIGINT $(pidof wineserver)
tail --pid=$(pidof wineserver) -f 2>/dev/null
kill -SIGINT $(pidof ConanSandboxServer.exe)
tail --pid=$(pidof ConanSandboxServer.exe) -f 2>/dev/null
exit 143;
}