Fixing bugs 2

This commit is contained in:
Eric Renfro 2023-10-31 14:26:51 -04:00
parent 233560167b
commit a28ee9e34c
Signed by: psi-jack
GPG key ID: 14977F3A50D9A5BF

View file

@ -46,7 +46,7 @@ _update_dns_namecheap() {
result="$(curl -qs \"https://dynamicdns.park-your-domain.com/update?host=${dnsHostname}&domain=${dnsDomain}&password=${dnsToken}&ip=${dnsIP}" | grep ErrCount)" result="$(curl -qs \"https://dynamicdns.park-your-domain.com/update?host=${dnsHostname}&domain=${dnsDomain}&password=${dnsToken}&ip=${dnsIP}" | grep ErrCount)"
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
errors="$(grep oPm1 "(?<=<ErrCount>)[^<]+" <<< $result)" errors="$(grep -oPm1 "(?<=<ErrCount>)[^<]+" <<< $result)"
if [[ "$errors" -eq 0 ]]; then if [[ "$errors" -eq 0 ]]; then
echo "DNS record ${dnsHostname}.${dnsDomain} updated successfully." echo "DNS record ${dnsHostname}.${dnsDomain} updated successfully."