add terminate option

This commit is contained in:
ville rantanen
2017-08-12 16:37:01 +03:00
parent 832168d43a
commit fb866e0011

View File

@@ -113,9 +113,10 @@ while true; do
this_pid="$( get_pid "${ids[$j]}" )" this_pid="$( get_pid "${ids[$j]}" )"
[[ -n "$this_pid" ]] && { [[ -n "$this_pid" ]] && {
# PID exists, ask to kill # PID exists, ask to kill
printf "\n ${colRow}k kill?${colZ}\n" printf "\n ${colRow}k kill?\n t terminate?${colZ}\n"
read -t 600 input2 read -t 600 input2
[[ "$input2" = "k" ]] && kill $( get_pid "${ids[$j]}" ) [[ "$input2" = "k" ]] && kill $( get_pid "${ids[$j]}" )
[[ "$input2" = "t" ]] && kill -9 $( get_pid "${ids[$j]}" )
} }
[[ -z "$this_pid" ]] && { [[ -z "$this_pid" ]] && {
# PID empty, run # PID empty, run