From c6262e7e3e1d594b5d9227120d0cba3ae3c2ab0d Mon Sep 17 00:00:00 2001 From: Bob Mottram <bob@freedombone.net> Date: Wed, 21 Jun 2017 22:45:38 +0100 Subject: [PATCH] freedns updater improvements --- src/freedombone-freedns | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/freedombone-freedns b/src/freedombone-freedns index da014d5c5..85ffb1f50 100755 --- a/src/freedombone-freedns +++ b/src/freedombone-freedns @@ -35,7 +35,7 @@ export TEXTDOMAINDIR="/usr/share/locale" VERBOSE= CONFIGURATION_FILE=$HOME/${PROJECT_NAME}.cfg -FREEDNS_WGET='wget -q --read-timeout=0.0 --waitretry=5 --tries=4 https://freedns.afraid.org/dynamic/update.php?' +FREEDNS_WGET='wget --read-timeout=0.0 --waitretry=5 --tries=4 https://freedns.afraid.org/dynamic/update.php?' if [[ "$1" == "--verbose" || "$1" == "-v" ]]; then VERBOSE=1 @@ -55,9 +55,6 @@ detected_codes=() codelines=$(grep "_CODE=" $CONFIGURATION_FILE | uniq) while read -r line; do code=$(echo "$line" | awk -F '=' '{print $2}') - if [ $VERBOSE ]; then - echo $"freedns code $code" - fi item_in_array "$code" "${detected_codes[@]}" if [[ $? != 0 ]]; then detected_codes+=("$code") @@ -70,7 +67,12 @@ fi cd $HOME/.freedns-update for code in "${detected_codes[@]}" do - $FREEDNS_WGET${code} + if [ $VERBOSE ]; then + echo $"command: $FREEDNS_WGET${code}=" + $FREEDNS_WGET${code}= + else + $FREEDNS_WGET${code}= >> /tmp/freedns 2>&1 + fi done exit 0 -- GitLab