leading space was breaking
This commit is contained in:
parent
53c5df9246
commit
8850bfa301
2
12345.sh
2
12345.sh
|
@ -73,7 +73,7 @@ while true; do
|
||||||
## RANDOM PORT SWAPPINESS AVOIDING COLLISION
|
## RANDOM PORT SWAPPINESS AVOIDING COLLISION
|
||||||
|
|
||||||
## CHECK PORT IS FREE & KILL OLD ONE
|
## CHECK PORT IS FREE & KILL OLD ONE
|
||||||
pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p ${PORT}" | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
|
pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p ${PORT}" | grep -v -E 'color=auto|grep' | awk '{gsub(/^ +| +$/,"")} {print $0}' | tail -n 1 | cut -d " " -f 1)
|
||||||
[[ $pidportinuse ]] && kill -9 $pidportinuse && echo "KILLING $pidportinuse" && continue
|
[[ $pidportinuse ]] && kill -9 $pidportinuse && echo "KILLING $pidportinuse" && continue
|
||||||
|
|
||||||
## CHECK 12345 PORT RUNNING (STATION FoF MAP)
|
## CHECK 12345 PORT RUNNING (STATION FoF MAP)
|
||||||
|
|
Loading…
Reference in New Issue