summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-06-22 04:22:28 +0000
committerColin Smith <colin@pfsense.org>2005-06-22 04:22:28 +0000
commita93f79c14f05ecab27b21705af17843224534c63 (patch)
tree236a0a69df5d3f144930f8d9d12e4b0f89365095
parentef09107dd4734492f8b5a3b65ce3a827ce36e754 (diff)
downloadpfsense-a93f79c14f05ecab27b21705af17843224534c63.zip
pfsense-a93f79c14f05ecab27b21705af17843224534c63.tar.gz
Fixes and updates.
-rw-r--r--etc/inc/service-utils.inc11
1 files changed, 6 insertions, 5 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index 4f636aa..ab2d7ca 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -81,7 +81,7 @@ function start_service($service) {
}
}
-function start_service($service) {
+function stop_service($service) {
global $config, $g;
if($config['installedpackages']['service']) {
foreach($config['installedpackages']['service'] as $service) {
@@ -125,13 +125,14 @@ function is_service_running($service, $ps = "") {
exec("/bin/ps a | awk '{ print $5 }'", $psout);
array_shift($psout);
foreach($psout as $line) {
- $ps[] = array_pop(explode('/', $line));
+ $ps[] = trim(array_pop(explode(' ', array_pop(explode('/', $line)))));
}
}
if($config['installedpackages']['service']) {
- foreach($config['installedpackages']['service'] as $service) {
- if($service['name'] == $service) {
- if(in_array($service['executable'], $ps)) {
+ foreach($config['installedpackages']['service'] as $aservice) {
+ if($service == $aservice['name']) {
+ if(!$aservice['executable']) return false;
+ if(in_array($aservice['executable'], $ps)) {
return true;
} else {
return false;
OpenPOWER on IntegriCloud