# State tracking to avoid spam
mkdir -p "$(dirname "$STATE_FILE")"
LAST_NOTIFIED=$(cat"$STATE_FILE"2>/dev/null || echo"0")
NOW=$(date +%s)
# Only notify once per hour max
MIN_INTERVAL=3600
send_notification() {
local message="$1"
local priority="${2:-default}"
echo"$(date '+%Y-%m-%d %H:%M:%S') - $message"
# Check if we notified recently if [ $((NOW - LAST_NOTIFIED)) -lt $MIN_INTERVAL ]; then echo"Skipping notification (sent recently)"
return fi
# Send via OpenClaw if phone configured and auth still valid if [ -n "$NOTIFY_PHONE" ]; then # Check if we can still use openclaw if"$SCRIPT_DIR/claude-auth-status.sh" simple 2>/dev/null | grep -q "OK\|EXPIRING"; then echo"Sending via OpenClaw to $NOTIFY_PHONE..."
openclaw send --to "$NOTIFY_PHONE" --message "$message"2>/dev/null || true fi fi
# Send via ntfy.sh if configured if [ -n "$NOTIFY_NTFY" ]; then echo"Sending via ntfy.sh to $NOTIFY_NTFY..."
curl -s -o /dev/null \
-H "Title: OpenClaw Auth Alert" \
-H "Priority: $priority" \
-H "Tags: warning,key" \
-d "$message" \ "https://ntfy.sh/$NOTIFY_NTFY" || true fi
# Update state echo"$NOW" > "$STATE_FILE"
}
# Check auth status if [ ! -f "$CLAUDE_CREDS" ]; then
send_notification "Claude Code credentials missing! Run: claude setup-token""high"
exit 1 fi
if [ "$DIFF_MS" -lt 0 ]; then
send_notification "Claude Code auth EXPIRED! OpenClaw is down. Run: ssh l36 '~/openclaw/scripts/mobile-reauth.sh'""urgent"
exit 1 elif [ "$HOURS_LEFT" -lt "$WARN_HOURS" ]; then
send_notification "Claude Code auth expires in ${HOURS_LEFT}h ${MINS_LEFT}m. Consider re-auth soon.""high"
exit 0 else echo"$(date '+%Y-%m-%d %H:%M:%S') - Auth OK: ${HOURS_LEFT}h ${MINS_LEFT}m remaining"
exit 0 fi
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.19Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-09)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.