mirror of
https://github.com/andrey271192/keenetic-dns-routes.git
synced 2026-09-20 14:42:01 +00:00
Per-router RCI creds + .env fallback; parse user:pass@ URL; fix apply/checkbox (kdns-sel), save groups on toggle; update.sh
Made-with: Cursor
This commit is contained in:
19
update.sh
Executable file
19
update.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Обновление keenetic-dns-routes: git pull, pip, перезапуск systemd.
|
||||
set -euo pipefail
|
||||
DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
cd "$DIR"
|
||||
echo "==> keenetic-dns-routes: $DIR"
|
||||
if [ -d .git ]; then git pull --ff-only; else echo "(!) Нет .git — скопируй файлы проекта поверх, затем снова update.sh."; fi
|
||||
if [ ! -d venv ]; then python3 -m venv venv; fi
|
||||
# shellcheck source=/dev/null
|
||||
source venv/bin/activate
|
||||
pip install -q -r requirements.txt
|
||||
if [ "$(id -u)" = 0 ] && [ -f /etc/systemd/system/keenetic-dns-routes.service ]; then
|
||||
systemctl daemon-reload
|
||||
systemctl restart keenetic-dns-routes
|
||||
echo "==> systemd: keenetic-dns-routes перезапущен"
|
||||
else
|
||||
echo "Перезапуск (root): sudo systemctl restart keenetic-dns-routes"
|
||||
fi
|
||||
echo "==> Готово. Обнови страницу в браузере (Ctrl+F5)."
|
||||
Reference in New Issue
Block a user