aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-08-28 09:06:22 -0400
committerjim-p <jimp@pfsense.org>2013-08-28 09:06:22 -0400
commitda4fcbcca56077414bcd2927508d4c65d5faa896 (patch)
tree0d5ab9e90493fc780d0740f8a69524f6b87727ac
parent0b2c3440efef324c771681bbd32d7c6b73c0a9fe (diff)
downloadpfsense-packages-da4fcbcca56077414bcd2927508d4c65d5faa896.tar.gz
pfsense-packages-da4fcbcca56077414bcd2927508d4c65d5faa896.tar.bz2
pfsense-packages-da4fcbcca56077414bcd2927508d4c65d5faa896.zip
Use a better function to get the service status.
-rw-r--r--config/servicewatchdog/servicewatchdog.inc2
-rw-r--r--config/servicewatchdog/servicewatchdog.xml2
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
4 files changed, 4 insertions, 4 deletions
diff --git a/config/servicewatchdog/servicewatchdog.inc b/config/servicewatchdog/servicewatchdog.inc
index d96a0f75..6e5f1f55 100644
--- a/config/servicewatchdog/servicewatchdog.inc
+++ b/config/servicewatchdog/servicewatchdog.inc
@@ -28,7 +28,7 @@ function servicewatchdog_check_services() {
$a_pwservices = &$config['installedpackages']['servicewatchdog']['item'];
foreach ($a_pwservices as $svc) {
- if (!is_service_running($svc['name'])) {
+ if (!get_service_status($svc)) {
$descr = strlen($svc['description']) > 50 ? substr($svc['description'], 0, 50) . "..." : $svc['description'];
log_error("Service Watchdog detected service {$svc['name']} stopped. Restarting {$svc['name']} ({$descr})");
service_control_start($svc['name'], $svc);
diff --git a/config/servicewatchdog/servicewatchdog.xml b/config/servicewatchdog/servicewatchdog.xml
index 70ecffe8..4a6fd6a8 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.0</version>
+ <version>1.1</version>
<title>Services: Service Watchdog</title>
<include_file>/usr/local/pkg/servicewatchdog.inc</include_file>
<menu>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index a6521070..a54b0081 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -1954,7 +1954,7 @@
<name>Service Watchdog</name>
<descr>Monitors for stopped services and restarts them.</descr>
<maintainer>jimp@pfsense.org</maintainer>
- <version>1.0</version>
+ <version>1.1</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 15ff2856..12db561d 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -1941,7 +1941,7 @@
<name>Service Watchdog</name>
<descr>Monitors for stopped services and restarts them.</descr>
<maintainer>jimp@pfsense.org</maintainer>
- <version>1.0</version>
+ <version>1.1</version>
<category>Services</category>
<status>BETA</status>
<config_file>http://www.pfsense.com/packages/config/servicewatchdog/servicewatchdog.xml</config_file>