Fix install.sh bugs and add auto-reboot
- Fix: Replace broad pkill with PID-specific kill -9 in start.sh - Fix: Remove unreachable deactivate call in start.sh - Fix: Add find_boot_config helper for RPi config file detection - Fix: Update autostart status message (remove fake systemd service claim) - Fix: Add ACTUAL_USER/ACTUAL_HOME to power management function - Add: Auto-reboot at end of install.sh with 5s cancel window - Add: Ctrl+C cleanup trap during installation
This commit is contained in:
@@ -292,8 +292,8 @@ while true; do
|
||||
log_message "⏳ Waiting ${RESTART_DELAY}s before restart..."
|
||||
sleep $RESTART_DELAY
|
||||
|
||||
# Cleanup any zombie processes
|
||||
pkill -9 -f "python3 main.py" 2>/dev/null
|
||||
# Ensure old player process is gone before restarting
|
||||
kill -9 $PLAYER_PID 2>/dev/null
|
||||
|
||||
done
|
||||
|
||||
@@ -301,6 +301,3 @@ log_message ""
|
||||
log_message "=========================================="
|
||||
log_message "Watchdog stopped"
|
||||
log_message "=========================================="
|
||||
|
||||
# Deactivate virtual environment (this line is never reached in watchdog mode)
|
||||
deactivate
|
||||
|
||||
Reference in New Issue
Block a user