From 4416ebd9247706e5dd0d978fee982888b28d0e2e Mon Sep 17 00:00:00 2001 From: jblu Date: Fri, 10 Apr 2026 16:19:36 -0500 Subject: [PATCH] fixed crontab writing jobs multiple times --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index cc63b7d..0bd72e3 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,7 +2,7 @@ CRON_CONFIG_FILE="/etc/crontabs/root" -echo "${CRON} python /opt/qbit-maid.py" >> $CRON_CONFIG_FILE -echo "@reboot python /opt/qbit-maid.py" >> $CRON_CONFIG_FILE +grep -qF 'python /opt/qbit-maid.py' $CRON_CONFIG_FILE || echo "${CRON} python /opt/qbit-maid.py" >> $CRON_CONFIG_FILE +grep -qF '@reboot' $CRON_CONFIG_FILE || echo "@reboot python /opt/qbit-maid.py" >> $CRON_CONFIG_FILE exec crond -f \ No newline at end of file