From 5ec75b6c8971ba5b6b2444cc85e2e65d1f4249a3 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 6 Dec 2022 23:11:06 +0100 Subject: [PATCH] BEtter Network balance --- G1BILLETS.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/G1BILLETS.sh b/G1BILLETS.sh index 19d8645..807c96e 100755 --- a/G1BILLETS.sh +++ b/G1BILLETS.sh @@ -108,6 +108,9 @@ 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])/") [[ $isLAN ]] && HNAME="http://g1billet.localhost" || HNAME="http://$(hostname)" + 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 ]] && kill -9 $pidportinuse && echo "KILLING NOT COLLECTED THREAD $pidportinuse" + HTTPWELLCOME='HTTP/1.1 200 OK Access-Control-Allow-Origin: * Access-Control-Allow-Credentials: true @@ -117,7 +120,7 @@ Content-Type: text/html; charset=UTF-8 - [Astroport] G1BILLET MICRO SERVICE - 33101 - 33102 - + [G1BILLET] HTTP MICRO SERVICE - 33101 - 33102 -