diff --git a/Dockerfile.ubuntu-1804 b/Dockerfile.ubuntu-1804 index 555446f..1006ebd 100644 --- a/Dockerfile.ubuntu-1804 +++ b/Dockerfile.ubuntu-1804 @@ -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 diff --git a/Dockerfile.ubuntu-2004 b/Dockerfile.ubuntu-2004 index 1b8ecea..8719167 100644 --- a/Dockerfile.ubuntu-2004 +++ b/Dockerfile.ubuntu-2004 @@ -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 diff --git a/Dockerfile.ubuntu-2204 b/Dockerfile.ubuntu-2204 index ba62507..60029a5 100644 --- a/Dockerfile.ubuntu-2204 +++ b/Dockerfile.ubuntu-2204 @@ -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 diff --git a/entrypoint-user.sh b/entrypoint-user.sh index 7c88029..7455704 100755 --- a/entrypoint-user.sh +++ b/entrypoint-user.sh @@ -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