aboutsummaryrefslogtreecommitdiffstats
path: root/config
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 /config
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.
Diffstat (limited to 'config')
-rw-r--r--config/servicewatchdog/servicewatchdog.inc2
-rw-r--r--config/servicewatchdog/servicewatchdog.xml2
2 files changed, 2 insertions, 2 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>