aboutsummaryrefslogtreecommitdiffstats
path: root/config/servicewatchdog/servicewatchdog.inc
diff options
context:
space:
mode:
authorJim P <jim@pingle.org>2014-02-03 06:41:04 -0800
committerJim P <jim@pingle.org>2014-02-03 06:41:04 -0800
commit009498abc6de6dfcec82ad2f88d1e096a3a76287 (patch)
treed1bddc3723312d55c8ae0a0954491dfb3b976674 /config/servicewatchdog/servicewatchdog.inc
parent2c6efc978d2fc988ff8fafbf59bcdc6050a3695d (diff)
parent1be457fba0f67cea5527cf8796cca84938674a1b (diff)
downloadpfsense-packages-009498abc6de6dfcec82ad2f88d1e096a3a76287.tar.gz
pfsense-packages-009498abc6de6dfcec82ad2f88d1e096a3a76287.tar.bz2
pfsense-packages-009498abc6de6dfcec82ad2f88d1e096a3a76287.zip
Merge pull request #585 from phil-davis/master
Service Watchdog manage cron job on package install and deinstall
Diffstat (limited to 'config/servicewatchdog/servicewatchdog.inc')
-rw-r--r--config/servicewatchdog/servicewatchdog.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/servicewatchdog/servicewatchdog.inc b/config/servicewatchdog/servicewatchdog.inc
index 1bdb1ce9..696e570e 100644
--- a/config/servicewatchdog/servicewatchdog.inc
+++ b/config/servicewatchdog/servicewatchdog.inc
@@ -48,14 +48,14 @@ function servicewatchdog_is_service_watched($svc) {
return false;
}
-function servicewatchdog_cron_job() {
+function servicewatchdog_cron_job($force_remove) {
global $config;
if (!is_array($config['installedpackages']['servicewatchdog']['item'])) {
$config['installedpackages']['servicewatchdog']['item'] = array();
}
$a_pwservices = &$config['installedpackages']['servicewatchdog']['item'];
- if (count($a_pwservices) > 0) {
+ if (($force_remove == false) && (count($a_pwservices) > 0)) {
// Add the cron job if it doesn't exist.
install_cron_job("/usr/local/pkg/servicewatchdog_cron.php", true, "*/1");
} else {
@@ -80,4 +80,4 @@ function servicewatchdog_check_services() {
}
}
-?> \ No newline at end of file
+?>