Merge branch 'pgrep' of evolix/evobackup into master

@jlecour being okay with this, I merge
This commit is contained in:
Tristan Pilat 2019-09-05 17:48:07 +02:00 committed by Gitea
commit 27b346a20d

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.