From 9a1248b3a813ccfad927362e8185879cdba26925 Mon Sep 17 00:00:00 2001 From: Marcello Coutinho Date: Mon, 7 May 2012 13:06:12 -0300 Subject: Stop service needs to wait process to be stopped before trying to restart it. --- etc/inc/service-utils.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'etc') diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index 57b1719..01230a1 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -129,7 +129,7 @@ function stop_service($name) { $prefix =& $service['prefix']; } if(file_exists("{$prefix}{$service['rcfile']}")) { - mwexec_bg("{$prefix}{$service['rcfile']} stop"); + mwexec("{$prefix}{$service['rcfile']} stop"); } return; } @@ -138,7 +138,7 @@ function stop_service($name) { if(!($service['rcfile'] or $service['stopcmd'])) { if(is_process_running("{$service['executable']}")) - mwexec_bg("/usr/bin/killall {$service['executable']}"); + mwexec("/usr/bin/killall {$service['executable']}"); return; } break; @@ -147,7 +147,7 @@ function stop_service($name) { } /* finally if we get here lets simply kill the service name */ if(is_process_running("{$name}")) - mwexec_bg("/usr/bin/killall {$name}"); + mwexec("/usr/bin/killall {$name}"); } function restart_service($name) { -- cgit v1.1