
File name
Commit message
Commit date

2024-05-20

2024-05-20

2024-05-20
#!/bin/bash
# Array to hold the process IDs
declare -a pids
# Start multiple Python processes in the background
python hls_streaming/hls.py &
pids+=($!)
python hls_streaming/hls.py &
pids+=($!)
# Function to kill all processes
cleanup() {
echo "Terminating all processes..."
for pid in "${pids[@]}"; do
kill -9 $pid
done
}
# Trap keyboard interrupt and call cleanup
trap cleanup SIGINT
# Print message
echo "Running... Press Ctrl+C to stop."
# Wait forever until Ctrl+C is pressed
while true; do
sleep 1
done