mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-03-01 22:38:27 +00:00
Finish up shellcheck and catch the final exit.
This commit is contained in:
parent
f213c16019
commit
e1382317b1
1 changed files with 13 additions and 8 deletions
|
@ -401,7 +401,9 @@ finalWork() {
|
|||
esac
|
||||
|
||||
if [[ "${tricorder}" ]]; then
|
||||
echo "::: Your debug token is : ${tricorder}"
|
||||
echo ":::"
|
||||
log_echo "::: Your debug token is : ${tricorder}"
|
||||
echo ":::"
|
||||
echo "::: Please contact the Pi-hole team with your token for assistance."
|
||||
echo "::: Thank you."
|
||||
else
|
||||
|
@ -414,7 +416,16 @@ finalWork() {
|
|||
echo "::: A local copy of the Debug log can be found at : /var/log/pihole_debug.log"
|
||||
}
|
||||
|
||||
count_gravity() {
|
||||
header_write "Analyzing gravity.list"
|
||||
|
||||
gravity_length=$(wc -l "${GRAVITYFILE}")
|
||||
if [[ "${gravity_length}" ]]; then
|
||||
log_write "${GRAVITYFILE} is ${gravity_length} lines long."
|
||||
else
|
||||
log_echo "Warning: No gravity.list file found!"
|
||||
fi
|
||||
}
|
||||
### END FUNCTIONS ###
|
||||
|
||||
# Gather version of required packages / repositories
|
||||
|
@ -440,13 +451,7 @@ files_check "${WHITELISTFILE}"
|
|||
files_check "${BLACKLISTFILE}"
|
||||
files_check "${ADLISTFILE}"
|
||||
|
||||
|
||||
header_write "Analyzing gravity.list"
|
||||
|
||||
gravity_length=$(wc -l "${GRAVITYFILE}") \
|
||||
&& log_write "${GRAVITYFILE} is ${gravity_length} lines long." \
|
||||
|| log_echo "Warning: No gravity.list file found!"
|
||||
|
||||
count_gravity
|
||||
dumpPiHoleLog
|
||||
|
||||
trap finalWork EXIT
|
||||
|
|
Loading…
Add table
Reference in a new issue