Obtain password length from utils script

This commit is contained in:
Bob Mottram 2016-07-03 17:24:28 +01:00
parent 27392b2743
commit cc26414f23
1 changed files with 2 additions and 2 deletions

View File

@ -64,10 +64,10 @@ fi
# Minimum number of characters in a password # Minimum number of characters in a password
MINIMUM_PASSWORD_LENGTH=10 MINIMUM_PASSWORD_LENGTH=10
if [ -f /usr/local/bin/${PROJECT_NAME} ]; then if [ -f /usr/local/bin/${PROJECT_NAME} ]; then
MINIMUM_PASSWORD_LENGTH=$(cat /usr/local/bin/${PROJECT_NAME} | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}') MINIMUM_PASSWORD_LENGTH=$(cat /usr/local/bin/${PROJECT_NAME}-utils-passwords | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}')
else else
if [ -f /usr/bin/${PROJECT_NAME} ]; then if [ -f /usr/bin/${PROJECT_NAME} ]; then
MINIMUM_PASSWORD_LENGTH=$(cat /usr/bin/${PROJECT_NAME} | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}') MINIMUM_PASSWORD_LENGTH=$(cat /usr/bin/${PROJECT_NAME}-utils-passwords | grep 'MINIMUM_PASSWORD_LENGTH=' | head -n 1 | awk -F '=' '{print $2}')
fi fi
fi fi