Add tail option

pull/973/head
DL6ER 8 years ago
parent b6639d9e7e
commit 5120d9ec33

@ -198,6 +198,10 @@ piholeStatus() {
fi fi
} }
tailFunc() {
tail -F /var/log/pihole.log
exit 0
}
helpFunc() { helpFunc() {
cat << EOM cat << EOM
@ -211,6 +215,7 @@ helpFunc() {
::: -b, blacklist Blacklist domains ::: -b, blacklist Blacklist domains
::: -d, debug Start a debugging session if having trouble ::: -d, debug Start a debugging session if having trouble
::: -f, flush Flush the pihole.log file ::: -f, flush Flush the pihole.log file
::: -t, tail Output the last lines of the pihole.log file. Lines are appended as the file grows
::: -up, updatePihole Update Pi-hole ::: -up, updatePihole Update Pi-hole
::: -g, updateGravity Update the list of ad-serving domains ::: -g, updateGravity Update the list of ad-serving domains
::: -s, setupLCD Automatically configures the Pi to use the 2.8 LCD screen to display stats on it ::: -s, setupLCD Automatically configures the Pi to use the 2.8 LCD screen to display stats on it
@ -256,5 +261,6 @@ case "${1}" in
"status" ) piholeStatus "$2";; "status" ) piholeStatus "$2";;
"restartdns" ) restartDNS;; "restartdns" ) restartDNS;;
"-a" | "admin" ) webpageFunc "$@";; "-a" | "admin" ) webpageFunc "$@";;
"-t" | "tail" ) tailFunc;;
* ) helpFunc;; * ) helpFunc;;
esac esac

Loading…
Cancel
Save