Revision 99f98b80
Added by Scott Ullrich over 15 years ago
etc/inc/service-utils.inc | ||
---|---|---|
115 | 115 |
eval($service['stopcmd']); |
116 | 116 |
} |
117 | 117 |
if(!($service['rcfile'] or $service['stopcmd'])) { |
118 |
mwexec_bg("/usr/bin/killall {$service['executable']}"); |
|
118 |
if(is_process_running("{$service['executable']}")) |
|
119 |
mwexec_bg("/usr/bin/killall {$service['executable']}"); |
|
119 | 120 |
return; |
120 | 121 |
} |
121 | 122 |
break; |
... | ... | |
123 | 124 |
} |
124 | 125 |
} |
125 | 126 |
/* finally if we get here lets simply kill the service name */ |
127 |
if(is_process_running("{$name}")) |
|
126 | 128 |
mwexec_bg("/usr/bin/killall {$name}"); |
127 | 129 |
} |
128 | 130 |
|
Also available in: Unified diff
Check to see if processes are running before killing