update player with wachdog and intro

This commit is contained in:
2025-11-22 10:26:20 +02:00
parent 68ed5b8534
commit 744681bb20
5 changed files with 276 additions and 33 deletions

34
stop_player.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
# Stop the player and watchdog
# Use this to gracefully shutdown the player
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "=========================================="
echo "Stopping Kivy Signage Player"
echo "=========================================="
echo ""
# Kill watchdog (start.sh)
echo "Stopping watchdog..."
pkill -f "bash.*start.sh"
# Kill player
echo "Stopping player..."
pkill -f "python3 main.py"
# Give processes time to exit gracefully
sleep 2
# Force kill if still running
pkill -9 -f "bash.*start.sh" 2>/dev/null
pkill -9 -f "python3 main.py" 2>/dev/null
# Clean up heartbeat and stop flag files
rm -f "$SCRIPT_DIR/.player_heartbeat"
rm -f "$SCRIPT_DIR/.player_stop_requested"
echo ""
echo "✓ Player and watchdog stopped"
echo ""