aboutsummaryrefslogtreecommitdiff
path: root/net/ddns-scripts/files/dynamic_dns_updater.sh
diff options
context:
space:
mode:
Diffstat (limited to 'net/ddns-scripts/files/dynamic_dns_updater.sh')
-rwxr-xr-xnet/ddns-scripts/files/dynamic_dns_updater.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ddns-scripts/files/dynamic_dns_updater.sh b/net/ddns-scripts/files/dynamic_dns_updater.sh
index b2baae231..b84e82920 100755
--- a/net/ddns-scripts/files/dynamic_dns_updater.sh
+++ b/net/ddns-scripts/files/dynamic_dns_updater.sh
@@ -195,6 +195,13 @@ ERR_LAST=$? # save return code - equal 0 if SECTION_ID found
[ "$ip_source" = "web" -a -z "$ip_url" -a $use_ipv6 -eq 1 ] && ip_url="http://checkipv6.dyndns.com"
[ "$ip_source" = "interface" -a -z "$ip_interface" ] && ip_interface="eth1"
+# url encode username (might be email or something like this)
+# and password (might have special chars for security reason)
+# and optional parameter "param_enc"
+[ -n "$username" ] && urlencode URL_USER "$username"
+[ -n "$password" ] && urlencode URL_PASS "$password"
+[ -n "$param_enc" ] && urlencode URL_PENC "$param_enc"
+
# SECTION_ID does not exists
[ $ERR_LAST -ne 0 ] && {
[ $VERBOSE -le 1 ] && VERBOSE=2 # force console out and logfile output
@@ -202,14 +209,14 @@ ERR_LAST=$? # save return code - equal 0 if SECTION_ID found
write_log 7 "************ ************** ************** **************"
write_log 5 "PID '$$' started at $(eval $DATE_PROG)"
write_log 7 "ddns version : $VERSION"
- write_log 7 "uci configuration:\n$(uci -q show ddns | grep '=service' | sort)"
+ write_log 7 "uci configuration:${N}$(uci -q show ddns | grep '=service' | sort)"
write_log 14 "Service section '$SECTION_ID' not defined"
}
write_log 7 "************ ************** ************** **************"
write_log 5 "PID '$$' started at $(eval $DATE_PROG)"
write_log 7 "ddns version : $VERSION"
-write_log 7 "uci configuration:\n$(uci -q show ddns.$SECTION_ID | sort)"
+write_log 7 "uci configuration:${N}$(uci -q show ddns.$SECTION_ID | sort)"
# write_log 7 "ddns version : $(opkg list-installed ddns-scripts | cut -d ' ' -f 3)"
case $VERBOSE in
0) write_log 7 "verbose mode : 0 - run normal, NO console output";;
@@ -254,13 +261,6 @@ esac
write_log 14 "Service section not configured correctly! Missing 'param_opt'"
}
-# url encode username (might be email or something like this)
-# and password (might have special chars for security reason)
-# and optional parameter "param_enc"
-[ -n "$username" ] && urlencode URL_USER "$username"
-[ -n "$password" ] && urlencode URL_PASS "$password"
-[ -n "$param_enc" ] && urlencode URL_PENC "$param_enc"
-
# verify ip_source 'script' if script is configured and executable
if [ "$ip_source" = "script" ]; then
set -- $ip_script #handling script with parameters, we need a trick