From b39dc701e59d5b3f2986f98fb3c710b9bc6d36df Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 10 Mar 2006 23:01:51 +0000 Subject: If we cannot find a service executable for an item and we make it to the bottom of stop_service() then simply killall service name --- etc/inc/service-utils.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'etc/inc/service-utils.inc') diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index 63ed887..ac144f8 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -104,13 +104,16 @@ function stop_service($name) { if($service['stopcmd']) { eval($service['stopcmd']); } - if(!($service['rcfile'] or $service['stopcmd'])) { - mwexec_bg("/usr/bin/killall {$service['executable']}"); - } + if(!($service['rcfile'] or $service['stopcmd'])) { + mwexec_bg("/usr/bin/killall {$service['executable']}"); + return; + } break; } } } + /* finally if we get here lets simply kill the service name */ + mwexec_bg("/usr/bin/killall {$name}"); } function restart_service($name) { -- cgit v1.1