This commit is contained in:
fred 2022-12-07 00:18:36 +01:00
parent f2dc4cf28b
commit 247ba502b1
1 changed files with 2 additions and 0 deletions

View File

@ -105,6 +105,8 @@ else
############## CLEAN START DEAMON MODE ###
pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p 33101" | grep -v -E 'color=auto|grep' | awk '{gsub(/^ +| +$/,"")} {print $0}' | 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' | awk '{gsub(/^ +| +$/,"")} {print $0}' | 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)
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")