aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-07-28 21:30:36 -0500
committerJesús <heckyel@hyperbola.info>2021-07-28 21:30:36 -0500
commitc826d1c7b537c2153ba4f632987d2fa40e484c6e (patch)
treebe6e71eb9dd2f11b3f561315807408c33d3ce003 /core
parented68527b2faf3b9e08b3e059f95c1183d789c5c8 (diff)
downloadyt-local-docker-c826d1c7b537c2153ba4f632987d2fa40e484c6e.tar.lz
yt-local-docker-c826d1c7b537c2153ba4f632987d2fa40e484c6e.tar.xz
yt-local-docker-c826d1c7b537c2153ba4f632987d2fa40e484c6e.zip
minor fix not pid 1 python3
Diffstat (limited to 'core')
-rw-r--r--core/entrypoint.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/entrypoint.sh b/core/entrypoint.sh
index 23dc9d9..5596bbd 100644
--- a/core/entrypoint.sh
+++ b/core/entrypoint.sh
@@ -92,10 +92,11 @@ EOF
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}")
if [ "$checkurl" = '502' ] || [ "$checkurl" = '302' ]; then
- pkill tor && tor -f /etc/tor/torrc --runasdaemon 1 2>&1
- pkill python3 && /usr/bin/python3 /srv/app/server.py
+ pkill tor && tor -f /etc/tor/torrc --runasdaemon 1
+ pkill python3 || true
+ /usr/bin/python3 /srv/app/server.py || true
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
sleep 5
done