Add stop-dashboard.sh
This commit is contained in:
21
stop-dashboard.sh
Normal file
21
stop-dashboard.sh
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Stop Home Assistant Dashboard from TTY
|
||||||
|
|
||||||
|
echo "Stopping Firefox dashboard..."
|
||||||
|
|
||||||
|
# Kill all Firefox processes for user kyle
|
||||||
|
pkill -u kyle firefox
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
if pgrep -u kyle firefox > /dev/null; then
|
||||||
|
echo "Some Firefox processes are still running. Force killing..."
|
||||||
|
pkill -9 -u kyle firefox
|
||||||
|
sleep 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! pgrep -u kyle firefox > /dev/null; then
|
||||||
|
echo "✓ Dashboard stopped"
|
||||||
|
else
|
||||||
|
echo "✗ Could not stop all Firefox processes"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user