From b4be05ac04147205b251f0bc816adca7ed0d1655 Mon Sep 17 00:00:00 2001 From: Peter Murphy Date: Thu, 20 Feb 2025 17:05:22 +0000 Subject: [PATCH] Remove kill command override --- torq.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/torq.sh b/torq.sh index 96b921d3c..6a5530b5c 100755 --- a/torq.sh +++ b/torq.sh @@ -150,12 +150,6 @@ top() { stop() { procno=$(awk '/,'$1',/{print NR}' "$CSVPATH") host=$(getfield "$procno" "host") - if [[ $host == "localhost" || $host == `hostname -i` || - ${hostips[@]} =~ $host || ${hostnames[@]} =~ $host ]]; then - kcmd="kill -15" - else - kcmd="$cmd" - fi if [[ -z $(findproc "$1") ]]; then echo "$(date '+%H:%M:%S') | $1 is not currently running" else @@ -166,7 +160,7 @@ stop() { if [[ ! $port =~ ^[0-9]+$ ]]; then port=$(($(eval echo \$$port))) fi - eval "$kcmd `lsof -i :$port -sTCP:LISTEN | awk '{if(NR>1)print $2}'`" + eval "$cmd `lsof -i :$port -sTCP:LISTEN | awk '{if(NR>1)print $2}'`" fi }