Skip to content

Commit

Permalink
Merge pull request #9 from phupp/master
Browse files Browse the repository at this point in the history
Configfile check can now handle more than one file.
Fixed the check for config files. Can now handle more than one file.
  • Loading branch information
chrisb86 committed Jun 30, 2015
2 parents a3562b4 + 7ef671a commit c64fc6d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nsupdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ command -v drill >/dev/null 2>&1 || command -v nslookup >/dev/null 2>&1 || { ech
##################
# check config #
##################
if [ ! -f nsupdate.d/*.config ]; then
echo "There does not seem to be ready to be used config file available." ; exit 1;
configfiles=$(shopt -s nullglob dotglob; echo nsupdate.d/*.config)
if (( ! ${#configfiles} ));then
echo "There does not seem to be any config file available." ; exit 1;
fi
##################

Expand Down

0 comments on commit c64fc6d

Please sign in to comment.