mirror of
https://github.com/andrey271192/Keenetic-Split-DNS.git
synced 2026-09-21 12:02:01 +00:00
Initial release: install, uninstall, SmartDNS, web UI
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
28
scripts/apply.sh
Executable file
28
scripts/apply.sh
Executable 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
|
||||
Reference in New Issue
Block a user