update 2026-05-27 23:25:57

This commit is contained in:
action committed 2026-05-27 23:25:57 +08:00
1 parent 84f707b52b
commit d0159b49a5
759 files changed
+362365

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
#!/bin/sh
#
# Copyright 2018-2025 Nick Peng <zxlhhyccc@gmail.com>
# Licensed to the public under the GPL V3 License.
action=$1
shift
log_file="$(uci -q get smartdns.@smartdns[0].log_file)"
list_file="${log_file:-/var/log/smartdns/smartdns.log}"
case "$action" in
tail)
if [ ! -e "$list_file" ]; then
echo "Log file does not exist."
fi
# read log
tail -n 5000 "$list_file"
;;
clear_log)
# clear log
> $list_file
;;
esac
@@ -0,0 +1,21 @@
{
"admin/services/smartdns": {
"title": "SmartDNS",
"order": 60,
"action": {
"type": "view",
"path": "smartdns/smartdns"
},
"depends": {
"acl": [ "luci-app-smartdns" ],
"uci": { "smartdns": true }
}
},
"admin/services/smartdns/log": {
"action": {
"type": "view",
"path": "smartdns/log"
}
}
}
@@ -0,0 +1,25 @@
{
"luci-app-smartdns": {
"description": "Grant access to LuCI app smartdns",
"read": {
"cgi-io": [ "exec" ],
"file": {
"/etc/smartdns/*": [ "read" ],
"/usr/libexec/smartdns-call tail": [ "exec" ],
"/usr/libexec/smartdns-call clear_log": [ "exec" ]
},
"ubus": {
"service": [ "list" ]
},
"uci": [ "smartdns" ]
},
"write": {
"file": {
"/etc/smartdns/*": [ "write" ],
"/etc/init.d/smartdns restart": [ "exec" ],
"/etc/init.d/smartdns updatefiles": [ "exec" ]
},
"uci": [ "smartdns" ]
}
}
}