Itterate through freedns codes

This commit is contained in:
Bob Mottram 2017-06-21 22:11:37 +01:00
parent cfae58f30f
commit c3895f3fb5
1 changed files with 2 additions and 3 deletions

View File

@ -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