fixed some syntax errors after last changes

This commit is contained in:
Daniel Steglich 2015-03-25 19:43:22 +01:00
parent 3d8228ce38
commit 22033aaea5

View File

@ -132,19 +132,19 @@ doWriteCFG()
# store the given options in ez-ipupdate compatible config file # store the given options in ez-ipupdate compatible config file
{ {
"host=${host}" echo "host=${host}"
"server=${server}" echo "server=${server}"
"user=${user}:${pass}" echo "user=${user}:${pass}"
"service-type=gnudip" echo "service-type=gnudip"
"retrys=3" echo "retrys=3"
"wildcard" echo "wildcard"
} > ${out_file} } > ${out_file}
# store UPDATE URL params # store UPDATE URL params
{ {
"POSTURL ${updateurl}" echo "POSTURL ${updateurl}"
"POSTAUTH ${basicauth}" echo "POSTAUTH ${basicauth}"
"POSTSSLIGNORE ${ignoreCertError}" echo "POSTSSLIGNORE ${ignoreCertError}"
} > ${HELPERCFG} } > ${HELPERCFG}
# check if we are behind a NAT Router # check if we are behind a NAT Router
@ -275,7 +275,8 @@ doGetWANIP()
{ {
if [ ! -z "${ipurl}" ];then if [ ! -z "${ipurl}" ];then
outfile=$(mktemp) outfile=$(mktemp)
"${WGET}" "${WGETOPTIONS}" -O "${outfile}" "${ipurl}" local cmd="${WGET} ${WGETOPTIONS} -O ${outfile} ${ipurl}"
$cmd
wanip=$(sed s/[^0-9.]//g "${outfile}") wanip=$(sed s/[^0-9.]//g "${outfile}")
rm "${outfile}" rm "${outfile}"
[ -z "${wanip}" ] && wanip=${NOIP} [ -z "${wanip}" ] && wanip=${NOIP}
@ -304,8 +305,8 @@ doUpdate()
if [ "${ignoreCertError}" = "enabled" ];then if [ "${ignoreCertError}" = "enabled" ];then
local wgetoptions=" --no-check-certificate " local wgetoptions=" --no-check-certificate "
fi fi
local cmd="${WGET} ${wgetoptions} ${updateurl}"
"${WGET}" "${wgetoptions}" "${updateurl}" $cmd
# ToDo: check the returning text from WEB Server. User need to give expected string. # ToDo: check the returning text from WEB Server. User need to give expected string.
if [ ${?} -eq 0 ];then if [ ${?} -eq 0 ];then
${0} success ${wanip} ${0} success ${wanip}