diff options
author | Phil Davis <phil.davis@world.inf.org> | 2014-02-03 03:16:11 -0800 |
---|---|---|
committer | Phil Davis <phil.davis@world.inf.org> | 2014-02-03 03:16:11 -0800 |
commit | ea86a80b3f2c347b7a4f2ccc60e45a1006d8998e (patch) | |
tree | 7bbcdd537284dcf59f4e35106b88366949b9ea77 /config | |
parent | 2c6efc978d2fc988ff8fafbf59bcdc6050a3695d (diff) | |
download | pfsense-packages-ea86a80b3f2c347b7a4f2ccc60e45a1006d8998e.tar.gz pfsense-packages-ea86a80b3f2c347b7a4f2ccc60e45a1006d8998e.tar.bz2 pfsense-packages-ea86a80b3f2c347b7a4f2ccc60e45a1006d8998e.zip |
Add option to force removal of service watchdog cron job
so that the job can always be removed when the package is removed.
Diffstat (limited to 'config')
-rw-r--r-- | config/servicewatchdog/servicewatchdog.inc | 6 |
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 +?> |