Fixed the check for config files. Can now handle more than one file.

This commit is contained in:
Philip 2015-06-30 20:12:59 +02:00
parent 1cb3c06072
commit 7ef671af06

View File

@ -33,7 +33,8 @@ command -v drill >/dev/null 2>&1 || command -v nslookup >/dev/null 2>&1 || { ech
##################
# check config #
##################
if [ ! -f nsupdate.d/*.config ]; then
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
##################