Skip to content

Commit

Permalink
Change apinger to dpinger on the fly
Browse files Browse the repository at this point in the history
when processing the Service Watchdog list.
Leave the permanent update of the list for when the user next edits Service Watchdog settings.
This is an alternate version of #105
  • Loading branch information
Phil Davis authored and jim-p committed Apr 14, 2016
1 parent 65a17ff commit a2ecbce
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ function servicewatchdog_check_services() {
$a_pwservices = &$config['installedpackages']['servicewatchdog']['item'];

foreach ($a_pwservices as $svc) {
// apinger became dpinger in pfSense 2.3
if ($svc['name'] == 'apinger') {
$svc['name'] = 'dpinger';
}
if (!get_service_status($svc)) {
$descr = strlen($svc['description']) > 50 ? substr($svc['description'], 0, 50) . "..." : $svc['description'];
$error_message = "Service Watchdog detected service {$svc['name']} stopped. Restarting {$svc['name']} ({$descr})";
Expand Down

0 comments on commit a2ecbce

Please sign in to comment.