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