From da4fcbcca56077414bcd2927508d4c65d5faa896 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 28 Aug 2013 09:06:22 -0400 Subject: Use a better function to get the service status. --- config/servicewatchdog/servicewatchdog.inc | 2 +- config/servicewatchdog/servicewatchdog.xml | 2 +- pkg_config.8.xml | 2 +- pkg_config.8.xml.amd64 | 2 +- 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 @@ None Monitors for stopped services and restarts them. Service Watchdog - 1.0 + 1.1 Services: Service Watchdog /usr/local/pkg/servicewatchdog.inc 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 @@ Service Watchdog Monitors for stopped services and restarts them. jimp@pfsense.org - 1.0 + 1.1 Services BETA http://www.pfsense.com/packages/config/servicewatchdog/servicewatchdog.xml 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 @@ Service Watchdog Monitors for stopped services and restarts them. jimp@pfsense.org - 1.0 + 1.1 Services BETA http://www.pfsense.com/packages/config/servicewatchdog/servicewatchdog.xml -- cgit v1.2.3