diff options
author | Colin Smith <colin@pfsense.org> | 2005-06-22 03:32:09 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-06-22 03:32:09 +0000 |
commit | dc312bf5e9394ffc9217631865cbfa56d7396521 (patch) | |
tree | 1f0e08db2bca68755643ddc3d9a6ce6a459137fd | |
parent | 1ffc911a1ac7c027b11294a644de756d80a9afbd (diff) | |
download | pfsense-dc312bf5e9394ffc9217631865cbfa56d7396521.zip pfsense-dc312bf5e9394ffc9217631865cbfa56d7396521.tar.gz |
Add executable.
-rw-r--r-- | etc/inc/service-utils.inc | 5 |
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"; |