summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-08-31 17:55:25 +0000
committerErmal <eri@pfsense.org>2010-08-31 17:55:25 +0000
commit246a887a009938f2bfb33d4ae43ae123c1c8cbaf (patch)
treee42a6b709f2e06086015249510c49c7f4cd40221 /etc
parent4c8a86531b1fcfc30fd359cff55954f6b9354e8a (diff)
downloadpfsense-246a887a009938f2bfb33d4ae43ae123c1c8cbaf.zip
pfsense-246a887a009938f2bfb33d4ae43ae123c1c8cbaf.tar.gz
Bring up openvpn up to speed and try to bring this file near to useful/readable.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/service-utils.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index 02b235c..6f26221 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -100,7 +100,8 @@ function start_service($name) {
function stop_service($name) {
global $config;
- if($config['installedpackages']['service']) {
+
+ if ($config['installedpackages']['service']) {
foreach($config['installedpackages']['service'] as $service) {
if(strtolower($service['name']) == strtolower($name)) {
if($service['rcfile']) {
@@ -109,7 +110,7 @@ function stop_service($name) {
} else {
$prefix = "/usr/local/etc/rc.d/";
}
- mwexec_bg($prefix . $service['rcfile'] . " stop");
+ mwexec_bg("{$prefix}{$service['rcfile']} stop");
}
if($service['stopcmd']) {
eval($service['stopcmd']);
@@ -124,8 +125,8 @@ function stop_service($name) {
}
}
/* finally if we get here lets simply kill the service name */
-if(is_process_running("{$name}"))
- mwexec_bg("/usr/bin/killall {$name}");
+ if(is_process_running("{$name}"))
+ mwexec_bg("/usr/bin/killall {$name}");
}
function restart_service($name) {
OpenPOWER on IntegriCloud