diff --git a/run.sh b/run.sh index 8af6650..ec90ad8 100755 --- a/run.sh +++ b/run.sh @@ -4,11 +4,12 @@ if [[ "$RESTORE" == "true" ]]; then ./restore.sh else ./backup.sh -fi -if [ -n "$CRON_TIME" ]; then - echo "${CRON_TIME} /backup.sh >> /dockup.log 2>&1" > /crontab.conf - crontab /crontab.conf - echo "=> Running dockup backups as a cronjob for ${CRON_TIME}" - exec cron -f -fi + if [ -n "$CRON_TIME" ]; then + echo "${CRON_TIME} /backup.sh >> /dockup.log 2>&1" > /crontab.conf + crontab /crontab.conf + echo "=> Running dockup backups as a cronjob for ${CRON_TIME}" + exec cron -f + fi + +fi \ No newline at end of file