-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkill-kiosk.sh
More file actions
executable file
·55 lines (48 loc) · 1.7 KB
/
Copy pathkill-kiosk.sh
File metadata and controls
executable file
·55 lines (48 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
echo "==============================================="
echo "ManyPaintings - Kill Kiosk for Debugging"
echo "==============================================="
# Stop the systemd service first
echo "Stopping systemd service..."
sudo systemctl stop manypaintings-kiosk.service
if [ $? -eq 0 ]; then
echo "✓ Systemd service stopped"
else
echo "⚠ Systemd service may not be running"
fi
# Kill Chrome/Chromium processes
echo "Killing Chrome/Chromium processes..."
CHROME_PIDS=$(pgrep -f "chromium-browser\|chrome")
if [ -n "$CHROME_PIDS" ]; then
pkill -f "chromium-browser"
pkill -f "chrome"
echo "✓ Chrome/Chromium processes killed"
else
echo "⚠ No Chrome/Chromium processes found"
fi
# Kill Python Flask processes
echo "Killing Python Flask processes..."
PYTHON_PIDS=$(pgrep -f "python.*launcher.py\|python.*app.py")
if [ -n "$PYTHON_PIDS" ]; then
pkill -f "python.*launcher.py"
pkill -f "python.*app.py"
echo "✓ Python Flask processes killed"
else
echo "⚠ No Python Flask processes found"
fi
# Wait a moment for processes to terminate
sleep 2
# Check if any processes are still running
REMAINING=$(pgrep -f "ManyPaintings\|launcher.py\|chromium.*localhost")
if [ -n "$REMAINING" ]; then
echo "⚠ Some processes may still be running:"
ps aux | grep -E "ManyPaintings|launcher.py|chromium.*localhost" | grep -v grep
echo "Use 'kill -9 <PID>' if needed"
else
echo "✓ All ManyPaintings processes terminated"
fi
echo "==============================================="
echo "Kiosk stopped for debugging"
echo "To restart: sudo systemctl start manypaintings-kiosk.service"
echo "Or just reboot the system"
echo "==============================================="