From d5cf333653438ddb77673d903ca80d444df6d53f Mon Sep 17 00:00:00 2001 From: sbwml <984419930@qq.com> Date: Tue, 21 Mar 2023 09:12:00 +0800 Subject: [PATCH] luci-app-mosdns: restart service after the rules updated --- luci-app-mosdns/root/usr/share/mosdns/mosdns.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh b/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh index 014ebcf..0cbf47f 100755 --- a/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh +++ b/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh @@ -80,6 +80,10 @@ geodat_update() ( rm -rf "$TMPDIR" ) +restart_service() { + service mosdns restart +} + case $script_action in "dns") interface_dns @@ -88,13 +92,13 @@ case $script_action in ad_block ;; "geodata") - geodat_update && adlist_update + geodat_update && adlist_update && restart_service ;; "logfile") logfile_path ;; "adlist_update") - adlist_update + adlist_update && restart_service ;; *) exit 0