mirror of
https://github.com/pi-hole/PADD.git
synced 2026-04-19 00:04:20 +01:00
check for dig and adjusts dependency check logic (#457)
This commit is contained in:
22
padd.sh
22
padd.sh
@@ -1517,15 +1517,31 @@ secretRead() {
|
||||
}
|
||||
|
||||
check_dependencies() {
|
||||
local hasDeps=true
|
||||
# Check for required dependencies
|
||||
if ! command -v curl >/dev/null 2>&1; then
|
||||
printf "%b" "${check_box_bad} Error!\n 'curl' is missing but required.\n"
|
||||
exit 1
|
||||
hasDeps=false
|
||||
fi
|
||||
|
||||
if ! command -v jq >/dev/null 2>&1; then
|
||||
printf "%b" "${check_box_bad} Error!\n 'jq' is missing but required.\n"
|
||||
exit 1
|
||||
printf "%b" "${check_box_bad} Error!\n 'jq' is missing but required.\n"
|
||||
hasDeps=false
|
||||
fi
|
||||
|
||||
if ! command -v dig >/dev/null 2>&1; then
|
||||
printf "%b" "${check_box_bad} Error!\n 'dig' is missing but required.\n"
|
||||
hasDeps=false
|
||||
fi
|
||||
|
||||
if ! command -v tput >/dev/null 2>&1; then
|
||||
printf "%b" "${check_box_bad} Error!\n 'tput' is missing but required.\n"
|
||||
hasDeps=false
|
||||
fi
|
||||
|
||||
if ! [ "${hasDeps}" = true ]; then
|
||||
printf "%b" "\n Please install the missing dependencies noted above.\n"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user