Commit 78002c42 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy) add configd to status_services.php page, closes...

(legacy) add configd to status_services.php page, closes https://github.com/opnsense/core/issues/754

(cherry picked from commit 4ae8fc6c)
parent 691021eb
......@@ -2680,6 +2680,9 @@ function get_services() {
if (isset($config['OPNsense']['IDS']['general']['enabled']) && $config['OPNsense']['IDS']['general']['enabled'] == 1) {
$services[] = array('name'=>'suricata', 'description' => gettext("Intrusion Detection"));
}
$services[] = array('name'=>'configd', 'description' => gettext("System Configuration Daemon"));
return $services;
}
......@@ -2718,6 +2721,9 @@ function get_service_status($service)
case 'ntpd':
$running = isvalidpid('/var/run/ntpd.pid');
break;
case 'configd':
$running = isvalidpid('/var/run/configd.pid');
break;
default:
$running = is_process_running($service['name']);
break;
......
......@@ -126,6 +126,9 @@ function service_control_start($name, $extras) {
case 'suricata':
configd_run("ids start");
break;
case 'configd':
mwexec('/usr/local/etc/rc.d/configd start');
break;
default:
log_error(sprintf(gettext("Could not start unknown service `%s'"), $name));
break;
......@@ -195,6 +198,9 @@ function service_control_stop($name, $extras) {
case 'suricata':
configd_run("ids stop");
break;
case 'configd':
killbypid("/var/run/configd.pid");
break;
default:
log_error(sprintf(gettext("Could not stop unknown service `%s'"), $name));
break;
......@@ -264,6 +270,9 @@ function service_control_restart($name, $extras) {
case 'suricata':
configd_run("ids restart");
break;
case 'configd':
mwexec('/usr/local/etc/rc.d/configd restart');
break;
default:
log_error(sprintf(gettext("Could not restart unknown service `%s'"), $name));
break;
......
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