File tree 2 files changed +26
-3
lines changed
2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ PADD (formerly Chronometer2) is a more expansive version of the original chronom
46
46
./padd.sh --server < DOMAIN| IP>
47
47
```
48
48
49
+ #### Dependencies
50
+ - curl
51
+ - jq
52
+ - dig
53
+ - tput
54
+
55
+
49
56
### Authentication
50
57
51
58
Pi-hole v6 uses a completely new API with a new authentication mechanism
Original file line number Diff line number Diff line change @@ -1516,16 +1516,32 @@ secretRead() {
1516
1516
}
1517
1517
1518
1518
check_dependencies () {
1519
+ local hasDeps=true
1519
1520
# Check for required dependencies
1520
1521
if ! command -v curl > /dev/null 2>&1 ; then
1521
1522
printf " %b" " ${check_box_bad} Error!\n 'curl' is missing but required.\n"
1522
- exit 1
1523
+ hasDeps=false
1523
1524
fi
1524
1525
1525
1526
if ! command -v jq > /dev/null 2>&1 ; then
1526
- printf " %b" " ${check_box_bad} Error!\n 'jq' is missing but required.\n"
1527
- exit 1
1527
+ printf " %b" " ${check_box_bad} Error!\n 'jq' is missing but required.\n"
1528
+ hasDeps=false
1529
+ fi
1530
+
1531
+ if ! command -v dig > /dev/null 2>&1 ; then
1532
+ printf " %b" " ${check_box_bad} Error!\n 'dig' is missing but required.\n"
1533
+ hasDeps=false
1528
1534
fi
1535
+
1536
+ if ! command -v tput > /dev/null 2>&1 ; then
1537
+ printf " %b" " ${check_box_bad} Error!\n 'tput' is missing but required.\n"
1538
+ hasDeps=false
1539
+ fi
1540
+
1541
+ if [ " ${hasDeps} " = false ]; then
1542
+ printf " %b" " \n Please install the dependencies noted above.\n"
1543
+ exit 1
1544
+ fi
1529
1545
}
1530
1546
1531
1547
# ######################################### MAIN FUNCTIONS ##########################################
You can’t perform that action at this time.
0 commit comments