minor fix not pid 1 python3
This commit is contained in:
parent
ed68527b2f
commit
c826d1c7b5
@ -92,10 +92,11 @@ EOF
|
|||||||
while :; do
|
while :; do
|
||||||
checkurl=$(curl --socks5 "localhost:${TOR_PORT:-9050}" -o /dev/null -s -w "%{http_code}\n" "${URL_CHECK:-https://www.youtube.com/results?search_query=rms}")
|
checkurl=$(curl --socks5 "localhost:${TOR_PORT:-9050}" -o /dev/null -s -w "%{http_code}\n" "${URL_CHECK:-https://www.youtube.com/results?search_query=rms}")
|
||||||
if [ "$checkurl" = '502' ] || [ "$checkurl" = '302' ]; then
|
if [ "$checkurl" = '502' ] || [ "$checkurl" = '302' ]; then
|
||||||
pkill tor && tor -f /etc/tor/torrc --runasdaemon 1 2>&1
|
pkill tor && tor -f /etc/tor/torrc --runasdaemon 1
|
||||||
pkill python3 && /usr/bin/python3 /srv/app/server.py
|
pkill python3 || true
|
||||||
|
/usr/bin/python3 /srv/app/server.py || true
|
||||||
else
|
else
|
||||||
pgrep python3 > /dev/null || exec /usr/bin/python3 /srv/app/server.py
|
pgrep python3 > /dev/null || /usr/bin/python3 /srv/app/server.py
|
||||||
fi
|
fi
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user