summaryrefslogtreecommitdiffstats
path: root/etc/inc/service-utils.inc
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-06-22 03:32:09 +0000
committerColin Smith <colin@pfsense.org>2005-06-22 03:32:09 +0000
commitdc312bf5e9394ffc9217631865cbfa56d7396521 (patch)
tree1f0e08db2bca68755643ddc3d9a6ce6a459137fd /etc/inc/service-utils.inc
parent1ffc911a1ac7c027b11294a644de756d80a9afbd (diff)
downloadpfsense-dc312bf5e9394ffc9217631865cbfa56d7396521.zip
pfsense-dc312bf5e9394ffc9217631865cbfa56d7396521.tar.gz
Add executable.
Diffstat (limited to 'etc/inc/service-utils.inc')
-rw-r--r--etc/inc/service-utils.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index 3408845..e0cb8a7 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -42,8 +42,11 @@ function write_rcfile($params) {
$towrite .= "rc_start() {\n\t" . $params['start'] . "\n}\n\n";
if($params['stop']) {
$tokill =& $params['stop'];
+ } elseif($params['executable']) {
+ // just nuke the executable
+ $tokill = "/usr/bin/killall {$params['executable']}";
} else {
- // make an educated guess
+ // make an educated guess (bad)
$tokill = array_pop(explode('/', array_shift(explode(' ', $params['start']))));
}
$towrite .= "rc_stop() {\n\t" . $tokill . "\n}\n\n";
OpenPOWER on IntegriCloud