better restart

This commit is contained in:
2025-11-21 20:19:12 +02:00
parent eef57305cd
commit c9b0dfa0ae
2 changed files with 12 additions and 0 deletions

View File

@@ -1 +1,7 @@
#list to be killed
sudo lsof -i :5000
#kill all port 5000 apps
sudo fuser -k 5000/udp
kill $(cat main.pid) $(cat webserver.pid) $(cat zrok.pid)

View File

@@ -1,5 +1,11 @@
#!/bin/bash
#list to be killed
sudo lsof -i :5000
#kill all port 5000 apps
sudo fuser -k 5000/udp
# Start main.py in the background
TQDM_DISABLE=1 nohup python3 main.py > main.log 2>&1 &
MAIN_PID=$!