summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-08-28 09:29:28 -0300
committerRenato Botelho <renato@netgate.com>2015-08-28 09:29:28 -0300
commitfc9a67bc0a0019f58b3daf32db1ffd09ac896407 (patch)
tree510e7d085df76b46bbbb5c6a60d1256d4155b384 /src
parent53ca09c8f155e983a9804a52319fb5c87f28900f (diff)
parentc0020b978b044abfb6d3d8745593542dea57dcf7 (diff)
downloadpfsense-fc9a67bc0a0019f58b3daf32db1ffd09ac896407.zip
pfsense-fc9a67bc0a0019f58b3daf32db1ffd09ac896407.tar.gz
Merge pull request #1828 from doktornotor/patch-7
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/services.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc
index c254c35..5f749f9 100644
--- a/src/etc/inc/services.inc
+++ b/src/etc/inc/services.inc
@@ -2438,8 +2438,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