mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
(legacy) add configd to status_services.php page, closes https://github.com/opnsense/core/issues/754
This commit is contained in:
parent
8a13c8a7b8
commit
4ae8fc6cb6
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user