diff options
author | Renato Botelho <renato@netgate.com> | 2015-09-08 10:12:48 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-09-08 10:12:48 -0300 |
commit | ef2175870c082c6460876373821722b8bc52eed0 (patch) | |
tree | 139c5f20fdb109bb3202ee3e8d4c43a00987d7a8 | |
parent | cef4103e0d683e9f7eb64d2adb3217835d1cd056 (diff) | |
parent | 98ff075e1b77504d0ddb88519f3737b505153554 (diff) | |
download | pfsense-ef2175870c082c6460876373821722b8bc52eed0.zip pfsense-ef2175870c082c6460876373821722b8bc52eed0.tar.gz |
Merge pull request #1845 from doktornotor/patch-6
-rw-r--r-- | etc/inc/services.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index ffc131c..105fac2 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -2282,8 +2282,13 @@ function configure_cron() { file_put_contents("/etc/crontab", $crontab_contents); unset($crontab_contents); + /* make sure that cron is running and start it if it got killed somehow */ + if (!is_process_running("cron")) { + exec("cd /tmp && /usr/sbin/cron -s 2>/dev/null"); + } else { /* do a HUP kill to force sync changes */ - sigkillbypid("{$g['varrun_path']}/cron.pid", "HUP"); + sigkillbypid("{$g['varrun_path']}/cron.pid", "HUP"); + } conf_mount_ro(); } |