-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Pihole and Pocketbase versions
- Loading branch information
1 parent
ea4b3df
commit dc04283
Showing
6 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2024.02.2 | ||
2024.03.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.22.4 | ||
0.22.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
# Initialize counters | ||
success_count=0 | ||
error_count=0 | ||
|
||
# Function to download the root hints file | ||
download_root_hints() { | ||
echo "Downloading the root hints file..." | ||
if curl -sSL https://www.internic.net/domain/named.root -o unbound/root.hints; then | ||
echo "Root hints file downloaded to unbound/root.hints" | ||
((success_count++)) | ||
else | ||
echo "Error downloading root hints file" | ||
((error_count++)) | ||
fi | ||
echo "------------------------" | ||
} | ||
|
||
# Function to test a root server | ||
test_root_server() { | ||
server_ip="$1" | ||
echo "Testing $server_ip..." | ||
if dig @"$server_ip" . NS +short; then | ||
echo "Test successful for $server_ip" | ||
((success_count++)) | ||
else | ||
echo "Test failed for $server_ip" | ||
((error_count++)) | ||
fi | ||
echo "------------------------" | ||
} | ||
|
||
# Path to the root hints file | ||
root_hints_file="unbound/root.hints" | ||
|
||
# Check if the root hints file exists; if not, download it | ||
if [ ! -f "$root_hints_file" ]; then | ||
download_root_hints | ||
fi | ||
|
||
# Read the root hints file and extract server IPs | ||
root_servers_from_file=($(grep -E '^[A-M]\.' "$root_hints_file" | awk '{print $NF}')) | ||
|
||
# Test each root server | ||
for server_ip in "${root_servers_from_file[@]}"; do | ||
test_root_server "$server_ip" | ||
done | ||
|
||
# Report the progress | ||
echo "Progress Report:" | ||
echo "Successful operations: $success_count" | ||
echo "Failed operations: $error_count" |