From d66205f8012ffc050a2993c6bb51fa0610203ca8 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 27 Jun 2025 00:10:43 +0100 Subject: [PATCH] feat(update): add option to disable update checks (#70) * Remove arbitrary server update cron job * feat(update): add option to disable update checks --------- Co-authored-by: Daniel Gibbs --- entrypoint-user.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/entrypoint-user.sh b/entrypoint-user.sh index 808605e..e4c41f9 100644 --- a/entrypoint-user.sh +++ b/entrypoint-user.sh @@ -91,11 +91,17 @@ else ./"${GAMESERVER}" sponsor fi -echo -e "" -echo -e "Starting Update Checks" -echo -e "=================================" -echo -e "*/${UPDATE_CHECK} * * * * /app/${GAMESERVER} update > /dev/null 2>&1" | crontab - -echo -e "update will check every ${UPDATE_CHECK} minutes" +if [ -n "${UPDATE_CHECK}" ] && [ "${UPDATE_CHECK}" != "0" ]; then + echo -e "" + echo -e "Starting Update Checks" + echo -e "=================================" + echo -e "*/${UPDATE_CHECK} * * * * /app/${GAMESERVER} update > /dev/null 2>&1" | crontab - + echo -e "update will check every ${UPDATE_CHECK} minutes" +else + echo -e "" + echo -e "Update checks are disabled" + echo -e "=================================" +fi # Update or validate game server if [ -z "${install}" ]; then