mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-11 00:20:55 +00:00
Add countdown timer
This commit is contained in:
parent
0f4c8d4923
commit
68cb0782c0
@ -316,6 +316,16 @@ debugLighttpd() {
|
|||||||
echo ":::"
|
echo ":::"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
countdown() {
|
||||||
|
tuvix=${TIMEOUT}
|
||||||
|
printf "::: Logging will automatically teminate in ${TIMEOUT} seconds\n"
|
||||||
|
while [ $tuvix -ge 1 ]
|
||||||
|
do
|
||||||
|
printf ":::\t${tuvix} seconds left. \r"
|
||||||
|
sleep 5
|
||||||
|
tuvix=$(( tuvix - 5 ))
|
||||||
|
done
|
||||||
|
}
|
||||||
### END FUNCTIONS ###
|
### END FUNCTIONS ###
|
||||||
|
|
||||||
# Gather version of required packages / repositories
|
# Gather version of required packages / repositories
|
||||||
@ -357,7 +367,7 @@ dumpPiHoleLog() {
|
|||||||
header_write "pihole.log"
|
header_write "pihole.log"
|
||||||
if [ -e "${PIHOLELOG}" ]; then
|
if [ -e "${PIHOLELOG}" ]; then
|
||||||
# Dummy process to use for flagging down tail to terminate
|
# Dummy process to use for flagging down tail to terminate
|
||||||
sleep ${TIMEOUT} &
|
countdown &
|
||||||
tail -n0 -f --pid=$! "${PIHOLELOG}" >> ${DEBUG_LOG}
|
tail -n0 -f --pid=$! "${PIHOLELOG}" >> ${DEBUG_LOG}
|
||||||
else
|
else
|
||||||
log_write "No pihole.log file found!"
|
log_write "No pihole.log file found!"
|
||||||
|
Loading…
Reference in New Issue
Block a user