Auto backup: 2026-02-21 07:01

This commit is contained in:
Krilly
2026-02-21 07:01:51 +00:00
parent 8757148122
commit 17b5b82d99
2012 changed files with 352552 additions and 331 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# openclaw-watchdog installer (Krilly's fork — Telegram + Gotify edition)
# openclaw-watchdog installer (Krilly's fork — Telegram + ntfy edition)
# https://github.com/jlgrimes/openclaw-watchdog
set -euo pipefail
@@ -7,7 +7,7 @@ INSTALL_DIR="$HOME/.openclaw"
SERVICE_NAME="openclaw-watchdog"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "🦞 OpenClaw Watchdog — Installer (Krilly's Telegram/Gotify Edition)"
echo "🦞 OpenClaw Watchdog — Installer (Krilly's Telegram/ntfy Edition)"
echo "───────────────────────────────────────────────────────────────────"
# Ensure install dir exists
@@ -22,14 +22,17 @@ echo "✅ Installed watchdog.sh → $INSTALL_DIR/watchdog.sh"
TELEGRAM_BOT_TOKEN=""
read -rp "Telegram Bot Token (leave blank to skip): " TELEGRAM_BOT_TOKEN
# Prompt for Gotify token
GOTIFY_TOKEN=""
read -rp "Gotify Token (leave blank to skip): " GOTIFY_TOKEN
# Prompt for ntfy topic
NTFY_URL="https://ntfy.sh"
read -rp "ntfy Server URL [$NTFY_URL]: " custom_ntfy
[[ -n "$custom_ntfy" ]] && NTFY_URL="$custom_ntfy"
# Prompt for custom Gotify URL
GOTIFY_URL="http://runtipi.kangaroo-eel.ts.net:8129"
read -rp "Gotify URL [$GOTIFY_URL]: " custom_gotify
[[ -n "$custom_gotify" ]] && GOTIFY_URL="$custom_gotify"
NTFY_TOPIC=""
read -rp "ntfy Topic (leave blank to skip): " NTFY_TOPIC
NTFY_MIN_PRIORITY="4"
read -rp "ntfy Min Priority [$NTFY_MIN_PRIORITY]: " custom_prio
[[ -n "$custom_prio" ]] && NTFY_MIN_PRIORITY="$custom_prio"
# Create env file
ENV_FILE="$INSTALL_DIR/watchdog.env"
@@ -46,8 +49,9 @@ OPENCLAW_CONFIG_PATH=$HOME/.openclaw/config.yaml
# Notification Settings
TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
TELEGRAM_CHAT=1793951355
GOTIFY_URL=${GOTIFY_URL}
GOTIFY_TOKEN=${GOTIFY_TOKEN}
NTFY_URL=${NTFY_URL}
NTFY_TOPIC=${NTFY_TOPIC}
NTFY_MIN_PRIORITY=${NTFY_MIN_PRIORITY}
# Legacy Discord (optional)
# DISCORD_CHANNEL_ID=
@@ -91,4 +95,4 @@ echo " Config: $ENV_FILE"
echo ""
echo "You'll get alerts via:"
[[ -n "$TELEGRAM_BOT_TOKEN" ]] && echo " ✅ Telegram"
[[ -n "$GOTIFY_TOKEN" ]] && echo "Gotify ($GOTIFY_URL)"
[[ -n "$NTFY_TOPIC" ]] && echo "ntfy ($NTFY_URL/$NTFY_TOPIC)"