Initial release: install, uninstall, SmartDNS, web UI

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Андрей Бобырев
2026-05-24 22:15:37 +03:00
commit bc9355fe40
21 changed files with 2715 additions and 0 deletions

28
scripts/apply.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/sh
# Apply configuration: compile, restart services, netfilter
set -e
KSD_ETC="${KSD_ETC:-/opt/etc/keenetic-split-dns}"
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname "$0")" && pwd)"
"$SCRIPT_DIR/compile-config.sh"
if [ -x /opt/etc/init.d/S98smartdns ]; then
/opt/etc/init.d/S98smartdns restart || /opt/etc/init.d/S98smartdns start
elif [ -x /opt/etc/init.d/S56smartdns ]; then
/opt/etc/init.d/S56smartdns restart || true
fi
if [ -x /opt/etc/init.d/S99ksd-web ]; then
/opt/etc/init.d/S99ksd-web restart || /opt/etc/init.d/S99ksd-web start
fi
NF="/opt/etc/ndm/netfilter.d/010-keenetic-split-dns.sh"
if [ -x "$NF" ]; then
"$NF" restart 2>/dev/null || true
ndm -p netfilter restart 2>/dev/null || true
fi
echo "Applied keenetic-split-dns configuration."
exit 0