Revision 6ae78f08
Added by Marcello Silva Coutinho about 13 years ago
etc/inc/service-utils.inc | ||
---|---|---|
129 | 129 |
$prefix =& $service['prefix']; |
130 | 130 |
} |
131 | 131 |
if(file_exists("{$prefix}{$service['rcfile']}")) { |
132 |
mwexec_bg("{$prefix}{$service['rcfile']} stop");
|
|
132 |
mwexec("{$prefix}{$service['rcfile']} stop"); |
|
133 | 133 |
} |
134 | 134 |
return; |
135 | 135 |
} |
... | ... | |
138 | 138 |
|
139 | 139 |
if(!($service['rcfile'] or $service['stopcmd'])) { |
140 | 140 |
if(is_process_running("{$service['executable']}")) |
141 |
mwexec_bg("/usr/bin/killall {$service['executable']}");
|
|
141 |
mwexec("/usr/bin/killall {$service['executable']}"); |
|
142 | 142 |
return; |
143 | 143 |
} |
144 | 144 |
break; |
... | ... | |
147 | 147 |
} |
148 | 148 |
/* finally if we get here lets simply kill the service name */ |
149 | 149 |
if(is_process_running("{$name}")) |
150 |
mwexec_bg("/usr/bin/killall {$name}");
|
|
150 |
mwexec("/usr/bin/killall {$name}"); |
|
151 | 151 |
} |
152 | 152 |
|
153 | 153 |
function restart_service($name) { |
Also available in: Unified diff
Stop service needs to wait process to be stopped before trying to restart/start it.