mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
Merge pull request #973 from pi-hole/taillog
Add tail argument to automatically "tail -f" pihole.log
This commit is contained in:
commit
74e33bb1a0
1 changed files with 7 additions and 0 deletions
7
pihole
7
pihole
|
@ -198,6 +198,11 @@ piholeStatus() {
|
|||
fi
|
||||
}
|
||||
|
||||
tailFunc() {
|
||||
echo "Press Ctrl-C to exit"
|
||||
tail -F /var/log/pihole.log
|
||||
exit 0
|
||||
}
|
||||
|
||||
helpFunc() {
|
||||
cat << EOM
|
||||
|
@ -211,6 +216,7 @@ helpFunc() {
|
|||
::: -b, blacklist Blacklist domains
|
||||
::: -d, debug Start a debugging session if having trouble
|
||||
::: -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
|
||||
::: -r, reconfigure Reconfigure or Repair Pi-hole
|
||||
::: -g, updateGravity Update the list of ad-serving domains
|
||||
|
@ -257,5 +263,6 @@ case "${1}" in
|
|||
"status" ) piholeStatus "$2";;
|
||||
"restartdns" ) restartDNS;;
|
||||
"-a" | "admin" ) webpageFunc "$@";;
|
||||
"-t" | "tail" ) tailFunc;;
|
||||
* ) helpFunc;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue