escapes more variables.

This commit is contained in:
Hyatt 2020-08-30 11:13:59 -05:00
parent a229c3e292
commit 1c367bb66a
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

@ -52,14 +52,14 @@ if [[ -z "\${DDNS_HOST}" ]] || [[ "\${DDNS_HOST}" == "" ]]; then
fi
printf '%s\n' "Detecting public IP"
DIP=$(dig @ns1.google.com TXT o-o.myaddr.l.google.com +short | sed -e 's/"//g')
DIP=\$(dig @ns1.google.com TXT o-o.myaddr.l.google.com +short | sed -e 's/"//g')
if [[ -z "\${DIP+x}" ]] || [[ "\${DIP}" == "" ]]; then
printf '%s\n' "Unable to detect real-world IP."
exit 100
fi
printf '%s\n' "Getting known IP"
KIP=$(dig \${DDNS_HOST} +short)
KIP=\$(dig \${DDNS_HOST} +short)
if [[ -z "\${KIP+x}" ]] || [[ "\${KIP}" == "" ]]; then
printf '%s\n' "Unable to get known IP."
exit 100