From 7eecbe3745e5f4590d2b6de9a57a9867eb11fa21 Mon Sep 17 00:00:00 2001 From: Tristan PILAT Date: Thu, 5 Sep 2019 11:41:56 +0200 Subject: [PATCH] Replace ps for pgrep to list evobackup child procs The command being used to identify evobackup child processes isn't supported on OpenBSD. The pgrep command is supported on both Linux and OpenBSD. --- zzz_evobackup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zzz_evobackup b/zzz_evobackup index 438d24d..74cc642 100755 --- a/zzz_evobackup +++ b/zzz_evobackup @@ -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.