Itterate through freedns codes
This commit is contained in:
parent
cfae58f30f
commit
c3895f3fb5
|
@ -53,8 +53,7 @@ function item_in_array {
|
||||||
|
|
||||||
detected_codes=()
|
detected_codes=()
|
||||||
codelines=$(grep "_CODE=" $CONFIGURATION_FILE | uniq)
|
codelines=$(grep "_CODE=" $CONFIGURATION_FILE | uniq)
|
||||||
for line in "${codelines[@]}"
|
while read -r line; do
|
||||||
do
|
|
||||||
code=$(echo "$line" | awk -F '=' '{print $2}')
|
code=$(echo "$line" | awk -F '=' '{print $2}')
|
||||||
if [ $VERBOSE ]; then
|
if [ $VERBOSE ]; then
|
||||||
echo $"freedns code $code"
|
echo $"freedns code $code"
|
||||||
|
@ -63,7 +62,7 @@ do
|
||||||
if [[ $? != 0 ]]; then
|
if [[ $? != 0 ]]; then
|
||||||
detected_codes+=("$code")
|
detected_codes+=("$code")
|
||||||
fi
|
fi
|
||||||
done
|
done <<< "$codelines"
|
||||||
|
|
||||||
if [ ! -d $HOME/.freedns-update ]; then
|
if [ ! -d $HOME/.freedns-update ]; then
|
||||||
mkdir $HOME/.freedns-update
|
mkdir $HOME/.freedns-update
|
||||||
|
|
Loading…
Reference in New Issue