From c3895f3fb51ca6abf33cb16c82060ff371d09d9a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 21 Jun 2017 22:11:37 +0100 Subject: [PATCH] Itterate through freedns codes --- src/freedombone-freedns | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/freedombone-freedns b/src/freedombone-freedns index 6ad9cb1b..da014d5c 100755 --- a/src/freedombone-freedns +++ b/src/freedombone-freedns @@ -53,8 +53,7 @@ function item_in_array { detected_codes=() codelines=$(grep "_CODE=" $CONFIGURATION_FILE | uniq) -for line in "${codelines[@]}" -do +while read -r line; do code=$(echo "$line" | awk -F '=' '{print $2}') if [ $VERBOSE ]; then echo $"freedns code $code" @@ -63,7 +62,7 @@ do if [[ $? != 0 ]]; then detected_codes+=("$code") fi -done +done <<< "$codelines" if [ ! -d $HOME/.freedns-update ]; then mkdir $HOME/.freedns-update