Browse Source
feat: change from using watch to cron
Watch command is sometimes causing updates to lock up. Migrating to cronjob instead
pull/37/merge
Daniel Gibbs
1 year ago
No known key found for this signature in database
GPG Key ID: 2076B128385E8C55
4 changed files with
6 additions and
6 deletions
-
Dockerfile.ubuntu-1804
-
Dockerfile.ubuntu-2004
-
Dockerfile.ubuntu-2204
-
entrypoint-user.sh
|
|
@ -17,7 +17,7 @@ ENV LGSM_SERVERFILES=/data/serverfiles |
|
|
|
ENV LGSM_DATADIR=/data/data |
|
|
|
ENV LGSM_CONFIG=/data/config-lgsm |
|
|
|
ENV GAMESERVER=jc2server |
|
|
|
ENV UPDATE_CHECK=1800 |
|
|
|
ENV UPDATE_CHECK=60 |
|
|
|
ENV USER=linuxgsm |
|
|
|
ENV UID=1000 |
|
|
|
ENV GID=1000 |
|
|
|
|
|
@ -17,7 +17,7 @@ ENV LGSM_SERVERFILES=/data/serverfiles |
|
|
|
ENV LGSM_DATADIR=/data/data |
|
|
|
ENV LGSM_CONFIG=/data/config-lgsm |
|
|
|
ENV GAMESERVER=jc2server |
|
|
|
ENV UPDATE_CHECK=1800 |
|
|
|
ENV UPDATE_CHECK=60 |
|
|
|
ENV USER=linuxgsm |
|
|
|
ENV UID=1000 |
|
|
|
ENV GID=1000 |
|
|
|
|
|
@ -17,7 +17,7 @@ ENV LGSM_SERVERFILES=/data/serverfiles |
|
|
|
ENV LGSM_DATADIR=/data/data |
|
|
|
ENV LGSM_CONFIG=/data/config-lgsm |
|
|
|
ENV GAMESERVER=jc2server |
|
|
|
ENV UPDATE_CHECK=1800 |
|
|
|
ENV UPDATE_CHECK=60 |
|
|
|
ENV USER=linuxgsm |
|
|
|
ENV UID=1000 |
|
|
|
ENV GID=1000 |
|
|
|
|
|
@ -42,12 +42,12 @@ else |
|
|
|
# Sponsor to display LinuxGSM logo |
|
|
|
./"${GAMESERVER}" sponsor |
|
|
|
fi |
|
|
|
|
|
|
|
echo -e "" |
|
|
|
echo -e "Starting Update Checks" |
|
|
|
echo -e "=================================" |
|
|
|
nohup watch -n "${UPDATE_CHECK}" ./"${GAMESERVER}" update > /dev/null 2>&1 & |
|
|
|
minutes=$((UPDATE_CHECK / 60)) |
|
|
|
echo -e "update will check every ${minutes} minutes" |
|
|
|
echo -e "* */${UPDATE_CHECK} * * * /app/${GAMESERVER} update > /dev/null 2>&1" | crontab - |
|
|
|
echo -e "update will check every ${UPDATE_CHECK} minutes" |
|
|
|
|
|
|
|
# Update game server |
|
|
|
if [ -z "${install}" ]; then |
|
|
|