31807f37bf
Repo hygiene: - Remove dead scripts (.wait-for-display, .display-keepalive, .keep-screen-alive) - Remove stale backup/scratch (install.sh.bak, New.txt, stale .pyc) - Stop tracking machine-specific/generated state (config/app_config.json, playlists/server_playlist.json, src/player_auth.json, generated launchers) - Prune duplicate wheel versions (one per package) - Reorganize working_files -> dev/, dev/tests/, documentation/dev-notes/, scripts/ - Extend .gitignore; fix no-op rules in repo/.gitignore Offline install (install.sh): - Non-fatal system-dep step; per-package apt retry; .deb bundle install - Skip pip self-upgrade offline; guard online fallbacks behind connectivity probe - Dependency-free fetch_url (curl/wget/urllib); --no-reboot flag - Fix corrupted literal backslash-bang escapes (shebangs, test -f, banner) - Idempotent cron install (no more stacked @reboot lines) Autostart / watchdog: - start.sh: single-instance flock lock (.player_watchdog.lock) acquired only after a display is confirmed, preventing parallel watchdogs - Set XDG_RUNTIME_DIR when missing; exit early if headless - run_player.sh: activate .venv; stop_player.sh: clear lock file
36 lines
829 B
Bash
Executable File
36 lines
829 B
Bash
Executable File
#!/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"
|
|
rm -f "$SCRIPT_DIR/.player_watchdog.lock"
|
|
|
|
echo ""
|
|
echo "✓ Player and watchdog stopped"
|
|
echo ""
|