pidportinuse
This commit is contained in:
parent
796c2bf1e1
commit
3ac3ef7f36
|
@ -103,9 +103,9 @@ else
|
|||
################################################################################
|
||||
## MAKE IT A NETWORK MICRO SERVICE -- PORTS : INPUT=33101 OUTPUT=33102
|
||||
############## CLEAN START DEAMON MODE ###
|
||||
pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p 33101" | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 2)
|
||||
pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p 33101" | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
|
||||
[[ $pidportinuse ]] && kill -9 $pidportinuse && echo "KILLING 33101 $pidportinuse"
|
||||
pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p 33102" | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 2)
|
||||
pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p 33102" | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
|
||||
[[ $pidportinuse ]] && kill -9 $pidportinuse && echo "KILLING NOT COLLECTED THREAD $pidportinuse"
|
||||
#####################################################################
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
|
|
Loading…
Reference in New Issue