summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-01-30 03:23:24 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-01-30 03:23:24 +0000
commita4ea33406c8bfca8aa04c0e33d001f47b57b2f21 (patch)
treecf1289f79c36c894449f3e1cec3018225185ad1d
parent2fc057fdd98ff72e69f8ce36a23435bfbf284d27 (diff)
downloadpfsense-a4ea33406c8bfca8aa04c0e33d001f47b57b2f21.zip
pfsense-a4ea33406c8bfca8aa04c0e33d001f47b57b2f21.tar.gz
Do one command or the other
-rw-r--r--etc/inc/service-utils.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index 63a0a85..63ed887 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -72,10 +72,12 @@ function start_service($name) {
} else {
$prefix = "/usr/local/etc/rc.d/";
}
- if(file_exists($prefix . $service['rcfile']))
+ if(file_exists($prefix . $service['rcfile'])) {
mwexec_bg($prefix . $service['rcfile'] . " start");
- if(file_exists("/usr/local/etc/rc.d/{$name}.sh"))
- mwexec_bg("/usr/local/etc/rc.d/{$name}.sh start");
+ } else {
+ if(file_exists("/usr/local/etc/rc.d/{$name}.sh"))
+ mwexec_bg("/usr/local/etc/rc.d/{$name}.sh start");
+ }
}
if($service['startcmd']) {
eval($service['startcmd']);
OpenPOWER on IntegriCloud