improve indentation
using $(...) instead of `...` is a better style
This commit is contained in:
parent
899af06837
commit
107ba9ad83
23
nsupdate.sh
23
nsupdate.sh
@ -59,22 +59,22 @@ if ls $(dirname $0)/nsupdate.d/*.config &> /dev/null; then
|
|||||||
|
|
||||||
if [[ "$USE_DRILL" == "YES" ]]; then
|
if [[ "$USE_DRILL" == "YES" ]]; then
|
||||||
if [[ "$TYPE" == "MX" ]]; then
|
if [[ "$TYPE" == "MX" ]]; then
|
||||||
echo looking up MX records with drill currently not supported!
|
echo looking up MX records with drill currently not supported!
|
||||||
exit 1;
|
exit 1
|
||||||
else
|
else
|
||||||
NSLOOKUP=$(drill $DOMAIN @ns.inwx.de $TYPE | head -7 | tail -1 | awk '{print $5}')
|
NSLOOKUP=$(drill $DOMAIN @ns.inwx.de $TYPE | head -7 | tail -1 | awk '{print $5}')
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ "$TYPE" == "MX" ]]; then
|
if [[ "$TYPE" == "MX" ]]; then
|
||||||
PART_NSLOOKUP=$(nslookup -sil -type=$TYPE $DOMAIN - ns.inwx.de | tail -2 | head -1 | cut -d' ' -f5)
|
PART_NSLOOKUP=$(nslookup -sil -type=$TYPE $DOMAIN - ns.inwx.de | tail -2 | head -1 | cut -d' ' -f5)
|
||||||
NSLOOKUP=${PART_NSLOOKUP%"."}
|
NSLOOKUP=${PART_NSLOOKUP%"."}
|
||||||
else
|
else
|
||||||
NSLOOKUP=$(nslookup -sil -type=$TYPE $DOMAIN - ns.inwx.de | tail -2 | head -1 | cut -d' ' -f2)
|
NSLOOKUP=$(nslookup -sil -type=$TYPE $DOMAIN - ns.inwx.de | tail -2 | head -1 | cut -d' ' -f2)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# WAN_IP=`curl -s -$CONNECTION_TYPE ${IP_CHECK_SITE}| grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'`
|
# WAN_IP=`curl -s -$CONNECTION_TYPE ${IP_CHECK_SITE}| grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'`
|
||||||
WAN_IP=`curl -s -$CONNECTION_TYPE ${IP_CHECK_SITE}`
|
WAN_IP=$(curl -s -$CONNECTION_TYPE ${IP_CHECK_SITE})
|
||||||
|
|
||||||
|
|
||||||
API_XML="<?xml version=\"1.0\"?>
|
API_XML="<?xml version=\"1.0\"?>
|
||||||
@ -131,5 +131,6 @@ if ls $(dirname $0)/nsupdate.d/*.config &> /dev/null; then
|
|||||||
unset INWX_DOMAIN_ID
|
unset INWX_DOMAIN_ID
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "There does not seem to be any config file available in $(dirname $0)/nsupdate.d/." ; exit 1;
|
echo "There does not seem to be any config file available in $(dirname $0)/nsupdate.d/."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user