mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Carriage return or newline based webcalls.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
38961fb31b
commit
83b0600863
@ -332,11 +332,17 @@ debugLighttpd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
countdown() {
|
countdown() {
|
||||||
|
local tuvix
|
||||||
tuvix=${TIMEOUT}
|
tuvix=${TIMEOUT}
|
||||||
printf "::: Logging will automatically teminate in ${TIMEOUT} seconds\n"
|
printf "::: Logging will automatically teminate in %s seconds\n" "${TIMEOUT}"
|
||||||
while [ $tuvix -ge 1 ]
|
while [ $tuvix -ge 1 ]
|
||||||
do
|
do
|
||||||
printf ":::\t${tuvix} seconds left. \r"
|
printf ":::\t%s seconds left. " "${tuvix}"
|
||||||
|
if [[ -z "${WEBCALL}" ]]; then
|
||||||
|
printf "\r"
|
||||||
|
else
|
||||||
|
printf "\n"
|
||||||
|
fi
|
||||||
sleep 5
|
sleep 5
|
||||||
tuvix=$(( tuvix - 5 ))
|
tuvix=$(( tuvix - 5 ))
|
||||||
done
|
done
|
||||||
|
9
pihole
9
pihole
@ -46,11 +46,18 @@ wildcardFunc() {
|
|||||||
|
|
||||||
debugFunc() {
|
debugFunc() {
|
||||||
local automated
|
local automated
|
||||||
|
local web
|
||||||
|
|
||||||
|
# Pull off the `debug` leaving passed call augmentation flags in $1
|
||||||
shift
|
shift
|
||||||
if [[ "${1}" == "-a" ]]; then
|
if [[ "${1}" == "-a" ]]; then
|
||||||
automated="true"
|
automated="true"
|
||||||
fi
|
fi
|
||||||
AUTOMATED=${automated:-} "${PI_HOLE_SCRIPT_DIR}"/piholeDebug.sh
|
if [[ "${2}" == "-w" ]]; then
|
||||||
|
web="true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AUTOMATED=${automated:-} WEBCALL=${web:-} "${PI_HOLE_SCRIPT_DIR}"/piholeDebug.sh
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user