mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-01-11 14:34:44 +00:00
commit
325a41c598
1 changed files with 10 additions and 2 deletions
|
@ -331,7 +331,15 @@ function dumpPiHoleLog {
|
||||||
# Anything to be done after capturing of pihole.log terminates
|
# Anything to be done after capturing of pihole.log terminates
|
||||||
function finalWork {
|
function finalWork {
|
||||||
echo "::: Finshed debugging!"
|
echo "::: Finshed debugging!"
|
||||||
|
SPRUNGE=$(cat /var/log/pihole_debug.log | curl --silent --connect-timeout 5 -F 'sprunge=<-' http://sprunge.us)
|
||||||
|
|
||||||
|
# Check if sprunge.us is reachable. When it's not, point to local log instead
|
||||||
|
if [ -n "$SPRUNGE" ]
|
||||||
|
then
|
||||||
|
echo "::: Debug log can be found at : $SPRUNGE"
|
||||||
|
else
|
||||||
echo "::: Debug log can be found at : /var/log/pihole_debug.log"
|
echo "::: Debug log can be found at : /var/log/pihole_debug.log"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
trap finalWork EXIT
|
trap finalWork EXIT
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue