mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
serivce: need another type for command launcher
This commit is contained in:
parent
4d3ac63ac3
commit
6f2daad533
@ -2702,6 +2702,9 @@ function services_get()
|
||||
$services[] = array(
|
||||
'description' => gettext('System Configuration Daemon'),
|
||||
'pidfile' => '/var/run/configd.pid',
|
||||
'mwexec' => array(
|
||||
'start' => array('/usr/local/etc/rc.d/configd start'),
|
||||
),
|
||||
'name' => 'configd',
|
||||
);
|
||||
|
||||
|
||||
@ -102,9 +102,15 @@ function service_control_start($name, $extras)
|
||||
}
|
||||
/* XXX fall through later */
|
||||
return sprintf(gettext('%s has been started via php.'), htmlspecialchars($name));
|
||||
} elseif (isset($service['mwexec']['start'])) {
|
||||
foreach ($service['mwexec']['start'] as $cmd) {
|
||||
mwexec($cmd);
|
||||
}
|
||||
/* XXX fall through later */
|
||||
return sprintf(gettext('%s has been started via mwexec.'), htmlspecialchars($name));
|
||||
}
|
||||
|
||||
/* XXX migrate all of those */
|
||||
/* XXX migrate all of those */
|
||||
switch ($service['name']) {
|
||||
case 'radvd':
|
||||
services_radvd_configure();
|
||||
@ -149,9 +155,6 @@ function service_control_start($name, $extras)
|
||||
case 'suricata':
|
||||
configd_run("ids start");
|
||||
break;
|
||||
case 'configd':
|
||||
mwexec('/usr/local/etc/rc.d/configd start');
|
||||
break;
|
||||
case 'captiveportal':
|
||||
configd_run("captiveportal start");
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user