mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2026-03-12 21:02:52 -07:00
PiSugar 3 users need graceful shutdown with e-ink feedback, boot-loop prevention when charging from dead battery, and automatic recovery when pisugar-server loses I2C connection after MCU wake. - safe-shutdown.sh: stops pwnagotchi, draws sleeping face on e-ink, powers off. Boot-loop guard skips shutdown when battery <10% and charging. - pisugar-watchdog.sh + systemd timer: detects MCU wake from deep sleep and restarts pisugar-server when I2C is present but daemon reports disconnected. - epd-shutdown.py / epd-startup.py: e-ink display faces for Waveshare V4. Exit silently on non-V4 displays. Signed-off-by: CoderFX <4704376+CoderFX@users.noreply.github.com>
11 lines
170 B
SYSTEMD
11 lines
170 B
SYSTEMD
[Unit]
|
|
Description=Run PiSugar 3 MCU watchdog every 15 seconds
|
|
|
|
[Timer]
|
|
OnBootSec=30s
|
|
OnUnitActiveSec=15s
|
|
Unit=pisugar-watchdog.service
|
|
|
|
[Install]
|
|
WantedBy=timers.target
|