Update mosdns.sh
This commit is contained in:
parent
6887e0b0b6
commit
4cbf23597c
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
script_action=${1}
|
||||
|
||||
logfile_path() (
|
||||
configfile=$(uci -q get mosdns.config.configfile)
|
||||
if [ "$configfile" = "/etc/mosdns/config.yaml" ]; then
|
||||
@ -78,14 +80,23 @@ geodat_update() (
|
||||
rm -rf "$TMPDIR"
|
||||
)
|
||||
|
||||
if [ "$1" == "dns" ]; then
|
||||
case $script_action in
|
||||
"dns")
|
||||
interface_dns
|
||||
elif [ "$1" == "ad" ]; then
|
||||
;;
|
||||
"ad")
|
||||
ad_block
|
||||
elif [ "$1" == "geodata" ]; then
|
||||
;;
|
||||
"geodata")
|
||||
geodat_update && adlist_update
|
||||
elif [ "$1" == "logfile" ]; then
|
||||
;;
|
||||
"logfile")
|
||||
logfile_path
|
||||
elif [ "$1" == "adlist_update" ]; then
|
||||
;;
|
||||
"adlist_update")
|
||||
adlist_update
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user