smart-interactive-display/Assets/StreamingAssets/MergeFace/kill_process.sh

13 lines
307 B
Bash
Raw Permalink Normal View History

2024-06-21 03:34:06 -07:00
#!/bin/bash
# Find the process ID (PID) of the running main.py script
PID=$(pgrep -f "python .*main.py")
# Check if the process is running
if [ -z "$PID" ]; then
echo "Process main.py not found."
else
# Kill the process
kill -9 $PID
echo "Process main.py with PID $PID has been killed."
fi