From 234cbef539690b31baf5cea61db747608b3d32e3 Mon Sep 17 00:00:00 2001 From: "Achim D. Brucker" Date: Mon, 2 Apr 2018 12:01:54 +0100 Subject: [PATCH] Improved mode for terminating running downloads. --- scripts/global_update_monitor.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/global_update_monitor.sh b/scripts/global_update_monitor.sh index a0ba32b..8e57001 100755 --- a/scripts/global_update_monitor.sh +++ b/scripts/global_update_monitor.sh @@ -33,10 +33,10 @@ if ps u -C global_update.sh > /dev/null; then echo "* $NUM instances of global_update.sh still running (WARNING)" PIDS=`ps u -C global_update.sh | tail -n +2 | awk '{print $2}' | xargs` echo " Running PIDs: $PIDS" - if [ "$KILL"=="YES" ];then + if [[ "$KILL" == "YES" ]];then echo " KILL mode enabled, killing running global_update.sh instances" - echo " (executing pkill -P $PIDS)" - pkill -P $PIDS + echo " (executing pkill -9 -P $PIDS)" + pkill -9 -P $PIDS fi else echo "* global_update.sh not running"