diff --git a/entrypoint.sh b/entrypoint.sh index 0813991..8c21d1e 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,7 +2,7 @@ CRON_CONFIG_FILE="/etc/crontabs/root" -echo "${CRON} python /opt/crane.py" > $CRON_CONFIG_FILE -echo "@reboot python /opt/crane.py" >> $CRON_CONFIG_FILE +grep -qF '${CRON} python /opt/crane.py' $CRON_CONFIG_FILE ||echo "${CRON} python /opt/crane.py" >> $CRON_CONFIG_FILE +grep -qF '@reboot' $CRON_CONFIG_FILE || echo "@reboot python /opt/crane.py" >> $CRON_CONFIG_FILE exec crond -f \ No newline at end of file