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.
This commit is contained in:
parent
35f3434237
commit
7eecbe3745
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue