summarylogtreecommitdiffstats
path: root/initscript_openrc
diff options
context:
space:
mode:
Diffstat (limited to 'initscript_openrc')
-rw-r--r--initscript_openrc2
1 files changed, 2 insertions, 0 deletions
diff --git a/initscript_openrc b/initscript_openrc
index c1ee48ec9960..689884e9e9d1 100644
--- a/initscript_openrc
+++ b/initscript_openrc
@@ -32,11 +32,13 @@ start() {
stop() {
ebegin "Stopping $(basename "${_DAEMON}")"
start-stop-daemon --stop --exec "${_DAEMON}" || {
+ sleep 1
_pids="$(pidof "${_DAEMON}")"
for _pid in ${_pids}; do
kill -9 "${_pid}" &> /dev/null
done
}
+ sleep 1
_running="$(pidof "${_DAEMON}" | tr ' ' '\n' | wc -l)"
if [ ${_running} -gt 0 ]; then
eerror "Failed to stop or kill all ${_DAEMON} processes."