Fixing bugs 2
This commit is contained in:
parent
233560167b
commit
a28ee9e34c
1 changed files with 1 additions and 1 deletions
|
@ -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."
|
||||||
|
|
Loading…
Reference in a new issue