Files
domen_hydra_new/hydra_update.sh
Андрей Бобырев a63329af81 Add HydraRoute Manager web server — standalone domain management UI
Made-with: Cursor
2026-04-24 11:37:24 +03:00

14 lines
696 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
SERVER=$(cat /opt/etc/hydra_server_url 2>/dev/null)
[ -z "$SERVER" ] && echo "❌ /opt/etc/hydra_server_url не задан" && exit 1
HYDRA_DIR="/opt/etc/HydraRoute"
[ ! -d "$HYDRA_DIR" ] && HYDRA_DIR="/opt/etc/hydra"
[ ! -d "$HYDRA_DIR" ] && mkdir -p /opt/etc/HydraRoute && HYDRA_DIR="/opt/etc/HydraRoute"
echo "$(date) Обновляю конфиг с $SERVER..."
curl -sf "$SERVER/hydra/domain.conf" -o "$HYDRA_DIR/domain.conf" && echo "✅ domain.conf" || echo "❌ domain.conf"
curl -sf "$SERVER/hydra/ip.list" -o "$HYDRA_DIR/ip.list" && echo "✅ ip.list" || echo "❌ ip.list"
neo restart 2>/dev/null && echo "✅ neo restarted" || echo "⚠️ neo restart failed"