I adapted this launcher for cs2, all commands work properly. But for some reason, when the server crashes, restarting does not work.
In theory, this code should be responsible for restarting server if it crashes, but it doesn’t work. Can anyone give a hint?
# Start game
PARAM_START="${PARAM_START} ${GENERATED_ARGS}"
echo "Start command : $PARAM_START"
if [ "$CSGO_DOCKER" = "0" ]
then
if [ $(id -u) -eq 0 ]
then
su - ${USER} -c "cd $DIR_ROOT ; rm -f screenlog.* ; screen -L -AmdS $SCREEN_NAME ./$DAEMON_GAME $PARAM_START"
else
cd "$DIR_ROOT"
rm -f screenlog.*
screen -L -AmdS ${SCREEN_NAME} ./${DAEMON_GAME} ${PARAM_START}
fi
else
cd ${DIR_ROOT}
bash ${DAEMON_GAME} ${PARAM_START}
fi
OS Debian 11
I adapted this launcher for cs2, all commands work properly. But for some reason, when the server crashes, restarting does not work. In theory, this code should be responsible for restarting server if it crashes, but it doesn’t work. Can anyone give a hint?
https://github.com/crazy-max/csgo-server-launcher/blob/28be92206cad1a9d85791aa8064f8e51ecb41fa4/csgo-server-launcher.sh#L89 To start server I use
./cs2-server-launcher.sh start