Improved mode for terminating running downloads.
This commit is contained in:
parent
ec30fdda5a
commit
234cbef539
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue