Add daily timezone drift check
tz-drift-check.sh + sky-cam-tzcheck timer notify when TIMEZONE no longer matches the machine's timezone (timers follow the machine, scripts follow TIMEZONE). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013wi3ZRpfenCe2TRwT4JFMG
This commit is contained in:
+19
@@ -296,6 +296,25 @@ for cam in "${CAMERAS[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
# ── Timezone drift check ─────────────────────────────────────────────────────
|
||||
# Daily + shortly after boot: notify if TIMEZONE no longer matches the
|
||||
# machine's timezone (systemd timers follow the machine, scripts follow TIMEZONE).
|
||||
write_service "sky-cam-tzcheck" "timezone drift check" "tz-drift-check.sh"
|
||||
cat > "$UNIT_DIR/sky-cam-tzcheck.timer" <<EOF2
|
||||
[Unit]
|
||||
Description=Sky-Cam — timezone drift check
|
||||
|
||||
[Timer]
|
||||
OnBootSec=3min
|
||||
OnCalendar=*-*-* 12:00:00
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
EOF2
|
||||
echo " wrote sky-cam-tzcheck.timer"
|
||||
timers+=("sky-cam-tzcheck")
|
||||
|
||||
# ── Generate .env.example ────────────────────────────────────────────────────
|
||||
env_example="$HERE/.env.example"
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user