+ added cronjobs monitor / update / restart Sunday 10.00
This commit is contained in:
parent
9ebcd4f3a8
commit
9ea581784b
@ -36,7 +36,7 @@ RUN dpkg --add-architecture i386 && \
|
||||
apt-get update -y && \
|
||||
apt-get install -y mailutils postfix curl wget file bzip2 gzip unzip bsdmainutils python util-linux ca-certificates \
|
||||
binutils bc jq tmux lib32gcc1 libstdc++6 libstdc++6:i386 lib32tinfo5 \
|
||||
locales sudo && \
|
||||
locales sudo cron && \
|
||||
\
|
||||
groupadd -g $GROUP_ID $DOCKER_USER && \
|
||||
useradd -d "$STEAM_PATH" -g $GROUP_ID -u $USER_ID -m $DOCKER_USER && \
|
||||
|
@ -41,6 +41,16 @@ if [ -n "${SERVER_VOICE_ENABLE}" ]; then
|
||||
configReplace "sv_voiceenable" "$SERVER_VOICE_ENABLE"
|
||||
fi
|
||||
|
||||
#set up cronjob
|
||||
crontab -r | true
|
||||
rm -f "$STEAM_PATH/lgsm-cronjobs" | true
|
||||
touch "$STEAM_PATH/lgsm-cronjobs"
|
||||
echo "*/5 * * * * su - '$DOCKER_USER' -c '$STEAM_PATH/gmodserver monitor' > /dev/null 2>&1" >> "$STEAM_PATH/lgsm-cronjobs"
|
||||
echo "*/30 * * * * su - '$DOCKER_USER' -c '$STEAM_PATH/gmodserver update' > /dev/null 2>&1" >> "$STEAM_PATH/lgsm-cronjobs"
|
||||
echo "0 10 * * 0 su - '$DOCKER_USER' -c '$STEAM_PATH/gmodserver force-update' > /dev/null 2>&1" >> "$STEAM_PATH/lgsm-cronjobs"
|
||||
echo "" >> "$STEAM_PATH/lgsm-cronjobs"
|
||||
crontab "$STEAM_PATH/lgsm-cronjobs"
|
||||
|
||||
#this is a simple option for myself, but you can use it too
|
||||
if [ "$USE_MY_REPLACER_CONFIG" = "true" ] && [ ! -e "${SERVER_PATH}/garrysmod/data/jusito_ttt_entity_replace" ]; then
|
||||
mkdir -p "${SERVER_PATH}/garrysmod/data/jusito_ttt_entity_replace"
|
||||
|
Loading…
Reference in New Issue
Block a user