test fix
This commit is contained in:
14
deploy.sh
14
deploy.sh
@@ -217,7 +217,7 @@ fi
|
||||
|
||||
|
||||
|
||||
if ["$external_access_method" -eq 1]; then
|
||||
if [["$external_access_method" -eq 1]]; then
|
||||
# Verify DNS records
|
||||
echo -e "${cyan}Verifying DNS records...${nc}"
|
||||
echo ""
|
||||
@@ -225,7 +225,7 @@ if ["$external_access_method" -eq 1]; then
|
||||
# Check A record
|
||||
echo -e "${cyan}Checking A record for @...${nc}"
|
||||
a_record_check=$(dig +short A "$domain" @8.8.8.8 | grep -c "^$publicip$")
|
||||
if [ "$a_record_check" -eq 0 ]; then
|
||||
if [[ "$a_record_check" -eq 0 ]]; then
|
||||
echo -e "${cyan}⚠️ Warning: A record for @ is not set or not pointing to $publicip${nc}"
|
||||
else
|
||||
echo -e "${cyan}✅ A record for @ is correctly set to $publicip${nc}"
|
||||
@@ -234,7 +234,7 @@ if ["$external_access_method" -eq 1]; then
|
||||
# Check CNAME record
|
||||
echo -e "${cyan}Checking CNAME record for *...${nc}"
|
||||
cname_record_check=$(dig +short CNAME "*.$domain" @8.8.8.8 | grep -c "$domain\.$")
|
||||
if [ "$cname_record_check" -eq 0 ]; then
|
||||
if [[ "$cname_record_check" -eq 0 ]]; then
|
||||
echo -e "${cyan}⚠️ Warning: CNAME record for * is not set or not pointing to @${nc}"
|
||||
else
|
||||
echo -e "${cyan}✅ CNAME record for * is correctly set to @${nc}"
|
||||
@@ -251,7 +251,7 @@ if ["$external_access_method" -eq 1]; then
|
||||
|
||||
fi
|
||||
# Ask about static public IP if using public DNS
|
||||
if [ "$external_access_method" -eq 1 ]; then
|
||||
if [[ "$external_access_method" -eq 1 ]]; then
|
||||
|
||||
|
||||
while true; do
|
||||
@@ -565,11 +565,11 @@ Add any other subdomains you want to use.
|
||||
EOF
|
||||
|
||||
# Write PiHole config (only for options 2 and 3)
|
||||
if [ "$external_access_method" -eq 2 ] || [ "$external_access_method" -eq 3 ]; then
|
||||
if [[ "$external_access_method" -eq 2 ]] || [[ "$external_access_method" -eq 3 ]]; then
|
||||
echo "Writing PiHole configuration..."
|
||||
|
||||
# Use public IP for option 3, local IP for option 2
|
||||
if [ "$external_access_method" -eq 3 ]; then
|
||||
if [[ "$external_access_method" -eq 3 ]]; then
|
||||
dns_ip="$publicip"
|
||||
else
|
||||
dns_ip="$localip"
|
||||
@@ -584,7 +584,7 @@ EOF
|
||||
docker restart pihole
|
||||
fi
|
||||
# Enable DHCP on PiHole for options 2 and 3
|
||||
if [ "$external_access_method" -eq 2 ] || [ "$external_access_method" -eq 3 ]; then
|
||||
if [[ "$external_access_method" -eq 2 ]] || [ "$external_access_method" -eq 3 ]; then
|
||||
echo "Configuring DHCP on PiHole..."
|
||||
|
||||
# Get network information
|
||||
|
||||
Reference in New Issue
Block a user