From ea86a80b3f2c347b7a4f2ccc60e45a1006d8998e Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 3 Feb 2014 03:16:11 -0800 Subject: Add option to force removal of service watchdog cron job so that the job can always be removed when the package is removed. --- config/servicewatchdog/servicewatchdog.inc | 6 +++--- 1 file 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 +?> -- cgit v1.2.3 From 326dd1c3cd02f94909751fe9287a4fe38130641f Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 3 Feb 2014 03:18:26 -0800 Subject: Add and remove service watchdog cron job when the package is installed and removed. --- config/servicewatchdog/servicewatchdog.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/servicewatchdog/servicewatchdog.xml b/config/servicewatchdog/servicewatchdog.xml index 5e1ce309..c20f0a4e 100644 --- a/config/servicewatchdog/servicewatchdog.xml +++ b/config/servicewatchdog/servicewatchdog.xml @@ -69,4 +69,10 @@ 644 http://www.pfsense.com/packages/config/servicewatchdog/servicewatchdog.inc - \ No newline at end of file + + servicewatchdog_cron_job(); + + + servicewatchdog_cron_job(true); + + -- cgit v1.2.3 From df68ac01df217791edf7d0ef075392e148297e5d Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 3 Feb 2014 03:20:45 -0800 Subject: Service Watchdog version bump --- pkg_config.8.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_config.8.xml b/pkg_config.8.xml index 47da7aa8..eac69a81 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -1980,7 +1980,7 @@ Service Watchdog Monitors for stopped services and restarts them. jimp@pfsense.org - 1.4 + 1.5 Services BETA http://www.pfsense.com/packages/config/servicewatchdog/servicewatchdog.xml -- cgit v1.2.3 From 29e34ca2f80a88eb38318f3bdf7b5ad86a9ec0f2 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 3 Feb 2014 03:22:02 -0800 Subject: Service Watchdog version bump --- pkg_config.8.xml.amd64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index 22f93083..ae51523f 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -1967,7 +1967,7 @@ Service Watchdog Monitors for stopped services and restarts them. jimp@pfsense.org - 1.4 + 1.5 Services BETA http://www.pfsense.com/packages/config/servicewatchdog/servicewatchdog.xml -- cgit v1.2.3 From 3692884a679794f48290df022b2ef3f7beff0439 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 3 Feb 2014 03:23:33 -0800 Subject: Service Watchdog version bump --- pkg_config.10.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_config.10.xml b/pkg_config.10.xml index 8578b22b..09a9000f 100644 --- a/pkg_config.10.xml +++ b/pkg_config.10.xml @@ -1615,7 +1615,7 @@ Service Watchdog Monitors for stopped services and restarts them. jimp@pfsense.org - 1.4 + 1.5 Services BETA http://www.pfsense.com/packages/config/servicewatchdog/servicewatchdog.xml -- cgit v1.2.3 From 1be457fba0f67cea5527cf8796cca84938674a1b Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 3 Feb 2014 03:25:16 -0800 Subject: Service Watchdog version bump --- config/servicewatchdog/servicewatchdog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/servicewatchdog/servicewatchdog.xml b/config/servicewatchdog/servicewatchdog.xml index c20f0a4e..3df25c3c 100644 --- a/config/servicewatchdog/servicewatchdog.xml +++ b/config/servicewatchdog/servicewatchdog.xml @@ -40,7 +40,7 @@ None Monitors for stopped services and restarts them. Service Watchdog - 1.4 + 1.5 Services: Service Watchdog /usr/local/pkg/servicewatchdog.inc -- cgit v1.2.3