From f7dc46991c0505cd99e216c2e054abddd8108506 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 18 Dec 2017 22:13:24 +0100 Subject: [PATCH] Check whether lsof and gdb are available --- kill-wpull-connections | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/kill-wpull-connections b/kill-wpull-connections index ed1c756..3fe1ac1 100644 --- a/kill-wpull-connections +++ b/kill-wpull-connections @@ -30,6 +30,18 @@ then wpullPid=${pids[0]} fi +if ! command -v lsof >/dev/null 2>&1 +then + echo "Error: could not find lsof" + exit 1 +fi + +if ! command -v gdb >/dev/null 2>&1 +then + echo "Error: could not find gdb" + exit 1 +fi + if ! kill -0 ${wpullPid} >/dev/null 2>&1 then echo "Error: no process with PID ${wpullPid}"