Commit 4ae8fc6c authored by Ad Schellevis's avatar Ad Schellevis

(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
parent 8a13c8a7
......@@ -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;
......
......@@ -125,6 +125,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;
......@@ -194,6 +197,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;
......@@ -263,6 +269,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