Skip to content

Commit

Permalink
Fix check if variable was set
Browse files Browse the repository at this point in the history
  • Loading branch information
NyneR committed Dec 11, 2021
1 parent 5d7c9f0 commit fa3597c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nsupdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ if ls $(dirname $0)/nsupdate.d/*.config &> /dev/null; then
fi

# WAN_IP=`curl -s -$CONNECTION_TYPE ${IP_CHECK_SITE}| grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'`
if [[ -n "$IPCOMMAND" ]]; then
WAN_IP=$($IPCOMMAND)
else
if [[ -z ${IPCOMMAND} ]]; then
WAN_IP=$(curl -s -$CONNECTION_TYPE ${IP_CHECK_SITE})
else
WAN_IP=$($IPCOMMAND)
fi

# This is relevant for getting the specific domain record id.
Expand Down

0 comments on commit fa3597c

Please sign in to comment.