Commit ebf076e1 authored by Franco Fichtner's avatar Franco Fichtner

serivce: need another type for command launcher

(cherry picked from commit 6f2daad5)
parent f54cf1cc
......@@ -2709,6 +2709,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,6 +102,12 @@ 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 */
......@@ -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;
......
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