ddns-scripts: bump to version 2.7.8-1

- remove Cloudflare v1 protocol support #6084 #6519
- fix goip.de update url #6448 #6519
- change Cloudflare v4 to read "Proxied" from current setting at Cloudflare Dashboard #5097 #6364 #6505
- fix replace of password inside logfile #6568
- remove myself as PKG_MAINTAINER

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
This commit is contained in:
Christian Schoenebeck
2018-08-01 09:36:33 +02:00
parent d0bac09ae5
commit a6551b2cbc
13 changed files with 39 additions and 12706 deletions

View File

@@ -21,7 +21,7 @@
. /lib/functions/network.sh
# GLOBAL VARIABLES #
VERSION="2.7.7-2"
VERSION="2.7.8-1"
SECTION_ID="" # hold config's section name
VERBOSE=0 # default mode is log to console, but easily changed with parameter
MYPROG=$(basename $0) # my program call name
@@ -224,7 +224,7 @@ stop_daemon_for_all_ddns_sections() {
# value +10 will exit the scripts
# $2..n text to report
write_log() {
local __LEVEL __EXIT __CMD __MSG
local __LEVEL __EXIT __CMD __MSG __MSE
local __TIME=$(date +%H%M%S)
[ $1 -ge 10 ] && {
__LEVEL=$(($1-10))
@@ -258,8 +258,15 @@ write_log() {
[ $VERBOSE -gt 0 -o $__EXIT -gt 0 ] && echo -e "$__MSG"
# write to logfile
if [ ${use_logfile:-1} -eq 1 -o $VERBOSE -gt 1 ]; then
[ -n "$password" ] && __MSG=$( printf "%s" "$__MSG" | sed -e "s/$password/*password*/g" )
[ -n "$URL_PASS" ] && __MSG=$( printf "%s" "$__MSG" | sed -e "s/$URL_PASS/*URL_PASS*/g" )
if [ -n "$password" ]; then
# url encode __MSG, password already done
urlencode __MSE "$__MSG"
# replace encoded password inside encoded message
# and url decode (newline was encoded as %00)
__MSG=$( echo -e "$__MSE" \
| sed -e "s/$URL_PASS/***PW***/g" \
| sed -e "s/+/ /g; s/%00/\n/g; s/%/\\\\x/g" | xargs -0 printf "%b" )
fi
printf "%s\n" "$__MSG" >> $LOGFILE
# VERBOSE > 1 then NO loop so NO truncate log to $ddns_loglines lines
[ $VERBOSE -gt 1 ] || sed -i -e :a -e '$q;N;'$ddns_loglines',$D;ba' $LOGFILE
@@ -877,7 +884,7 @@ send_update() {
do_transfer "$__URL" || return 1
write_log 7 "DDNS Provider answered:\n$(cat $DATFILE)"
write_log 7 "DDNS Provider answered:${N}$(cat $DATFILE)"
[ -z "$UPD_ANSWER" ] && return 0 # not set then ignore
@@ -1197,17 +1204,17 @@ trap_handler() {
case $1 in
0) if [ $__ERR -eq 0 ]; then
write_log 5 "PID '$$' exit normal at $(eval $DATE_PROG)\n"
write_log 5 "PID '$$' exit normal at $(eval $DATE_PROG)${N}"
else
write_log 4 "PID '$$' exit WITH ERROR '$__ERR' at $(eval $DATE_PROG)\n"
write_log 4 "PID '$$' exit WITH ERROR '$__ERR' at $(eval $DATE_PROG)${N}"
fi ;;
1) write_log 6 "PID '$$' received 'SIGHUP' at $(eval $DATE_PROG)"
# reload config via starting the script again
/usr/lib/ddns/dynamic_dns_updater.sh -v "0" -S "$__SECTIONID" -- start || true
exit 0 ;; # and leave this one
2) write_log 5 "PID '$$' terminated by 'SIGINT' at $(eval $DATE_PROG)\n";;
3) write_log 5 "PID '$$' terminated by 'SIGQUIT' at $(eval $DATE_PROG)\n";;
15) write_log 5 "PID '$$' terminated by 'SIGTERM' at $(eval $DATE_PROG)\n";;
2) write_log 5 "PID '$$' terminated by 'SIGINT' at $(eval $DATE_PROG)${N}";;
3) write_log 5 "PID '$$' terminated by 'SIGQUIT' at $(eval $DATE_PROG)${N}";;
15) write_log 5 "PID '$$' terminated by 'SIGTERM' at $(eval $DATE_PROG)${N}";;
*) write_log 13 "Unhandled signal '$1' in 'trap_handler()'";;
esac