aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/servicewatchdog/servicewatchdog.inc6
-rw-r--r--config/servicewatchdog/servicewatchdog.xml10
-rw-r--r--pkg_config.10.xml2
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
5 files changed, 14 insertions, 8 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
+?>
diff --git a/config/servicewatchdog/servicewatchdog.xml b/config/servicewatchdog/servicewatchdog.xml
index 5e1ce309..3df25c3c 100644
--- a/config/servicewatchdog/servicewatchdog.xml
+++ b/config/servicewatchdog/servicewatchdog.xml
@@ -40,7 +40,7 @@
<requirements>None</requirements>
<faq>Monitors for stopped services and restarts them.</faq>
<name>Service Watchdog</name>
- <version>1.4</version>
+ <version>1.5</version>
<title>Services: Service Watchdog</title>
<include_file>/usr/local/pkg/servicewatchdog.inc</include_file>
<menu>
@@ -69,4 +69,10 @@
<chmod>644</chmod>
<item>http://www.pfsense.com/packages/config/servicewatchdog/servicewatchdog.inc</item>
</additional_files_needed>
-</packagegui> \ No newline at end of file
+ <custom_php_install_command>
+ servicewatchdog_cron_job();
+ </custom_php_install_command>
+ <custom_php_deinstall_command>
+ servicewatchdog_cron_job(true);
+ </custom_php_deinstall_command>
+</packagegui>
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 @@
<name>Service Watchdog</name>
<descr>Monitors for stopped services and restarts them.</descr>
<maintainer>jimp@pfsense.org</maintainer>
- <version>1.4</version>
+ <version>1.5</version>
<category>Services</category>
<status>BETA</status>
<config_file>http://www.pfsense.com/packages/config/servicewatchdog/servicewatchdog.xml</config_file>
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 @@
<name>Service Watchdog</name>
<descr>Monitors for stopped services and restarts them.</descr>
<maintainer>jimp@pfsense.org</maintainer>
- <version>1.4</version>
+ <version>1.5</version>
<category>Services</category>
<status>BETA</status>
<config_file>http://www.pfsense.com/packages/config/servicewatchdog/servicewatchdog.xml</config_file>
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 @@
<name>Service Watchdog</name>
<descr>Monitors for stopped services and restarts them.</descr>
<maintainer>jimp@pfsense.org</maintainer>
- <version>1.4</version>
+ <version>1.5</version>
<category>Services</category>
<status>BETA</status>
<config_file>http://www.pfsense.com/packages/config/servicewatchdog/servicewatchdog.xml</config_file>