Commit 21c9c8a1 authored by Matthias Bethke's avatar Matthias Bethke
Browse files

Fixed daemon rescue shell commands

'&&' is the logical AND operator and will simply run the "killer" subshell if
the init.d script returned success. What is needed is '&' to run the init script
in the background, otherwise $! is unset too. The sleep needs to be longer
because some daemons like mysql with lots of dirty buffers can take a while to
stop and we don't want to abort that attempt too early.
parent 62e0005f
......@@ -452,7 +452,7 @@ class rescue_core_module {
* So we have to try to stop but if this will not work, we have to kill the stopping
* of the service
*/
exec($app->system->getinitcommand($daemon, 'stop').' && (sleep 3; kill $!; sleep 2; kill -9 $!) &> /dev/null');
exec($app->system->getinitcommand($daemon, 'stop').' & (sleep 12; kill $!; sleep 2; kill -9 $!) &> /dev/null');
/*
* OK, we tryed to stop it normally, maybe this worked maybe not. So we have to look
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment