mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-01 16:44:45 +08:00
update 2026-09-24 10:46:53
This commit is contained in:
1 parent
907a158127
commit
b31a5c3878
4914 files changed
-1716179
No files matched your search
@@ -1,24 +0,0 @@
|
||||
#!/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
|
||||
Reference in new issue
Block a user