diff --git a/stop-dashboard.sh b/stop-dashboard.sh new file mode 100644 index 0000000..5b89131 --- /dev/null +++ b/stop-dashboard.sh @@ -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