escapes more variables.
This commit is contained in:
parent
a229c3e292
commit
1c367bb66a
@ -52,14 +52,14 @@ if [[ -z "\${DDNS_HOST}" ]] || [[ "\${DDNS_HOST}" == "" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
printf '%s\n' "Detecting public IP"
|
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
|
if [[ -z "\${DIP+x}" ]] || [[ "\${DIP}" == "" ]]; then
|
||||||
printf '%s\n' "Unable to detect real-world IP."
|
printf '%s\n' "Unable to detect real-world IP."
|
||||||
exit 100
|
exit 100
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf '%s\n' "Getting known IP"
|
printf '%s\n' "Getting known IP"
|
||||||
KIP=$(dig \${DDNS_HOST} +short)
|
KIP=\$(dig \${DDNS_HOST} +short)
|
||||||
if [[ -z "\${KIP+x}" ]] || [[ "\${KIP}" == "" ]]; then
|
if [[ -z "\${KIP+x}" ]] || [[ "\${KIP}" == "" ]]; then
|
||||||
printf '%s\n' "Unable to get known IP."
|
printf '%s\n' "Unable to get known IP."
|
||||||
exit 100
|
exit 100
|
||||||
|
Reference in New Issue
Block a user