This commit is contained in:
2026-07-12 08:16:17 +03:30
commit 72be1234e1
2027 changed files with 221388 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env python3
import subprocess
import sys
import signal
try:
# Find PID(s) of running 'radio' process (matching name)
out = subprocess.check_output(["pgrep", "-f", "radio"])
pids = [int(pid) for pid in out.decode().strip().split()]
except subprocess.CalledProcessError:
print("No running 'radio' process found.")
sys.exit(1)
for pid in pids:
try:
# Send SIGKILL (kill -9) to each found pid
subprocess.run(["kill", "-9", str(pid)])
print(f"Killed PID {pid}")
except Exception as e:
print(f"Failed to kill PID {pid}: {e}")