mirror of
https://github.com/pi-hole/PADD.git
synced 2026-04-18 07:48:49 +01:00
dependency check adjustment
Co-authored-by: yubiuser <github@yubiuser.dev> Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
This commit is contained in:
22
padd.sh
22
padd.sh
@@ -1516,15 +1516,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