Skip to content

Commit d66205f

Browse files
zuedevdgibbs64
andauthored
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 <[email protected]>
1 parent 07a5f31 commit d66205f

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

entrypoint-user.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,17 @@ else
9191
./"${GAMESERVER}" sponsor
9292
fi
9393

94-
echo -e ""
95-
echo -e "Starting Update Checks"
96-
echo -e "================================="
97-
echo -e "*/${UPDATE_CHECK} * * * * /app/${GAMESERVER} update > /dev/null 2>&1" | crontab -
98-
echo -e "update will check every ${UPDATE_CHECK} minutes"
94+
if [ -n "${UPDATE_CHECK}" ] && [ "${UPDATE_CHECK}" != "0" ]; then
95+
echo -e ""
96+
echo -e "Starting Update Checks"
97+
echo -e "================================="
98+
echo -e "*/${UPDATE_CHECK} * * * * /app/${GAMESERVER} update > /dev/null 2>&1" | crontab -
99+
echo -e "update will check every ${UPDATE_CHECK} minutes"
100+
else
101+
echo -e ""
102+
echo -e "Update checks are disabled"
103+
echo -e "================================="
104+
fi
99105

100106
# Update or validate game server
101107
if [ -z "${install}" ]; then

0 commit comments

Comments
 (0)