feat: power-loss boot resilience for Klubhaus DietPi
- restart: always for stack services - harden-boot.sh: fsck.repair, panic reboot, hardware watchdog, docker+zerotier enabled, klubhaus-stack.service autostart - kuma-online.sh: push up-heartbeat to Kuma on boot - RESILIENCE.md documents the Aug 30 failure + apply steps
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Push an "up" heartbeat to every configured Kuma push URL.
|
||||
# URLs live in /root/.kuma-push.env (one per line, # for comments).
|
||||
ENV_FILE=/root/.kuma-push.env
|
||||
|
||||
[ -f "$ENV_FILE" ] || { echo "no $ENV_FILE"; exit 0; }
|
||||
|
||||
while IFS= read -r url; do
|
||||
case "$url" in
|
||||
""|"#"*) continue ;;
|
||||
esac
|
||||
if curl -fsS -G --data-urlencode "status=up" --data-urlencode "msg=pi-online" "$url" >/dev/null 2>&1; then
|
||||
echo "OK ${url#https://up.notsosm.art/api/push/}"
|
||||
else
|
||||
echo "FAIL ${url#https://up.notsosm.art/api/push/}"
|
||||
fi
|
||||
done < "$ENV_FILE"
|
||||
Reference in New Issue
Block a user