Files
llinescan/run_live.sh
2025-11-21 20:19:12 +02:00

30 lines
737 B
Bash
Executable File

#!/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=$!
echo "Started main.py with PID: $MAIN_PID"
# Start webserver in the background
nohup python3 webserver.py > webserver.log 2>&1 &
WEB_PID=$!
echo "Started webserver.py with PID: $WEB_PID"
# Start zrok
nohup zrok share reserved liveline --headless &> ./zrok.log &
ZROK_PID=$!
# Save PIDs to file for easy stopping later
echo $MAIN_PID > main.pid
echo $WEB_PID > webserver.pid
echo $ZROK_PID > zrok.pid
echo "Both processes started successfully!"
echo "To stop them, run: kill \$(cat main.pid) \$(cat webserver.pid) \$(cat zrok.pid)"