Compare commits
5 Commits
lifyo
...
conanexile
Author | SHA1 | Date | |
---|---|---|---|
ff0e66eeca | |||
c086dbbc20 | |||
1f8a7093bd | |||
b8719be42b | |||
0504f3d698 |
@@ -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
|
8
scripts/start-watchdog.sh
Normal file
8
scripts/start-watchdog.sh
Normal 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
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user