diff options
author | Ermal <eri@pfsense.org> | 2010-08-31 17:55:25 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-08-31 17:55:25 +0000 |
commit | 246a887a009938f2bfb33d4ae43ae123c1c8cbaf (patch) | |
tree | e42a6b709f2e06086015249510c49c7f4cd40221 /etc/inc/service-utils.inc | |
parent | 4c8a86531b1fcfc30fd359cff55954f6b9354e8a (diff) | |
download | pfsense-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/inc/service-utils.inc')
-rw-r--r-- | etc/inc/service-utils.inc | 9 |
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) { |