summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-09-08 10:12:48 -0300
committerRenato Botelho <renato@netgate.com>2015-09-08 10:12:48 -0300
commitef2175870c082c6460876373821722b8bc52eed0 (patch)
tree139c5f20fdb109bb3202ee3e8d4c43a00987d7a8
parentcef4103e0d683e9f7eb64d2adb3217835d1cd056 (diff)
parent98ff075e1b77504d0ddb88519f3737b505153554 (diff)
downloadpfsense-ef2175870c082c6460876373821722b8bc52eed0.zip
pfsense-ef2175870c082c6460876373821722b8bc52eed0.tar.gz
Merge pull request #1845 from doktornotor/patch-6
-rw-r--r--etc/inc/services.inc7
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();
}
OpenPOWER on IntegriCloud