Commit e8a19ee3 authored by Franco Fichtner's avatar Franco Fichtner

services: ntpd has its own pid file

parent 1bd79607
...@@ -2613,29 +2613,32 @@ function service_name_compare($a, $b) { ...@@ -2613,29 +2613,32 @@ function service_name_compare($a, $b) {
} }
function get_service_status($service) { function get_service_status($service)
global $g; {
switch ($service['name']) { switch ($service['name']) {
case "openvpn": case 'openvpn':
$running = isvalidpid("/var/run/openvpn_{$service['mode']}{$service['vpnid']}.pid"); $running = isvalidpid("/var/run/openvpn_{$service['mode']}{$service['vpnid']}.pid");
break; break;
case "captiveportal": case 'captiveportal':
$running = isvalidpid("/var/run/lighty-{$service['zone']}-CaptivePortal.pid"); $running = isvalidpid("/var/run/lighty-{$service['zone']}-CaptivePortal.pid");
if (isset($config['captiveportal'][$service['zone']]['httpslogin'])) if (isset($config['captiveportal'][$service['zone']]['httpslogin'])) {
$running = $running && isvalidpid("/var/run/lighty-{$service['zone']}-CaptivePortal-SSL.pid"); $running = $running && isvalidpid("/var/run/lighty-{$service['zone']}-CaptivePortal-SSL.pid");
}
break; break;
case "vhosts-http": case 'dhcrelay6':
$running = isvalidpid("/var/run/vhosts-http.pid"); $running = isvalidpid('/var/run/dhcrelay6.pid');
break;
case "dhcrelay6":
$running = isvalidpid("/var/run/dhcrelay6.pid");
break; break;
case 'ipsec': case 'ipsec':
$running = isvalidpid("/var/run/charon.pid"); $running = isvalidpid('/var/run/charon.pid');
break;
case 'ntpd':
$running = isvalidpid('/var/run/ntpd.pid');
break; break;
default: default:
$running = is_process_running($service['name']); $running = is_process_running($service['name']);
break;
} }
return $running; return $running;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment