diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-01-30 03:23:24 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-01-30 03:23:24 +0000 |
commit | a4ea33406c8bfca8aa04c0e33d001f47b57b2f21 (patch) | |
tree | cf1289f79c36c894449f3e1cec3018225185ad1d | |
parent | 2fc057fdd98ff72e69f8ce36a23435bfbf284d27 (diff) | |
download | pfsense-a4ea33406c8bfca8aa04c0e33d001f47b57b2f21.zip pfsense-a4ea33406c8bfca8aa04c0e33d001f47b57b2f21.tar.gz |
Do one command or the other
-rw-r--r-- | etc/inc/service-utils.inc | 8 |
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']); |