Replace ps for pgrep to list evobackup child procs #29

Merged
Ghost merged 1 commit from pgrep into master 2019-09-05 17:48:12 +02:00

View file

@ -114,7 +114,7 @@ pick_server() {
if [ -e "${PIDFILE}" ]; then
pid=$(cat "${PIDFILE}")
# Killing the childs of evobackup.
for ppid in $(ps h --ppid "${pid}" -o pid | tr -s '\n' ' '); do
for ppid in $(pgrep -P "${pid}"); do
kill -9 "${ppid}";
done
# Then kill the main PID.