27 lines
570 B
Bash
Executable File
27 lines
570 B
Bash
Executable File
#!/bin/bash
|
|
echo "Stopping demucs-service..."
|
|
|
|
# Find and kill processes running ah.py for demucs-service
|
|
PIDS=$(ps aux | grep '[d]emucs.*ah.py' | awk '{print $2}')
|
|
|
|
if [ -z "$PIDS" ]; then
|
|
echo "No demucs-service processes found."
|
|
exit 0
|
|
fi
|
|
|
|
for pid in $PIDS; do
|
|
echo "Killing PID: $pid"
|
|
kill "$pid" 2>/dev/null
|
|
done
|
|
|
|
# Wait briefly then force kill if still running
|
|
sleep 2
|
|
for pid in $PIDS; do
|
|
if kill -0 "$pid" 2>/dev/null; then
|
|
echo "Force killing PID: $pid"
|
|
kill -9 "$pid" 2>/dev/null
|
|
fi
|
|
done
|
|
|
|
echo "demucs-service stopped."
|