Improved mode for terminating running downloads.

This commit is contained in:
Achim D. Brucker 2018-04-02 12:01:54 +01:00
parent ec30fdda5a
commit 234cbef539
1 changed files with 3 additions and 3 deletions

View File

@ -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"