diff --git a/on-boot-script/examples/udm-files/on_boot.d/25-add-cron-jobs.sh b/on-boot-script/examples/udm-files/on_boot.d/25-add-cron-jobs.sh index 7995730..c944500 100644 --- a/on-boot-script/examples/udm-files/on_boot.d/25-add-cron-jobs.sh +++ b/on-boot-script/examples/udm-files/on_boot.d/25-add-cron-jobs.sh @@ -20,6 +20,13 @@ esac ## This script will re-add them on startup. cp ${DATA_DIR}/cronjobs/* /etc/cron.d/ -/etc/init.d/crond restart +# Older UDM's had crond, so lets check if its here if so use that one, otherwise use cron +if [ -x /etc/init.d/crond ]; then + /etc/init.d/crond restart +elif [ -x /etc/init.d/cron ]; then + /etc/init.d/cron restart +else + echo "Neither crond nor cron found." +fi exit 0