|
@@ -40,8 +40,10 @@ test -z "$MONGODB_ADMIN_PASSWORD" && badconf
|
40
|
40
|
#Check for the presence of /usr/share/dict/words to generate random names
|
41
|
41
|
if [ -f '/usr/share/dict/words' ]
|
42
|
42
|
then
|
|
43
|
+ echo "/usr/share/dict/words found. Using this file as source for random names"
|
43
|
44
|
random_name=$(sed -nE 's/^([A-Za-z0-9]+)$/\1/p' /usr/share/dict/words |shuf|head -n1)
|
44
|
45
|
else
|
|
46
|
+ echo -e "\n\n\tWarning... /usr/share/dict/words not found using \$RANDOM for random names generation"
|
45
|
47
|
random_name=$RANDOM
|
46
|
48
|
fi
|
47
|
49
|
|
|
@@ -100,7 +102,7 @@ then
|
100
|
102
|
echo "Using pwgen to generate passwords"
|
101
|
103
|
rnd_pass_cmd='pwgen 25 1'
|
102
|
104
|
else
|
103
|
|
- echo "pwgen not found !!! Using \$RANDOM to generate passwords"
|
|
105
|
+ echo -e "\n\n\tpwgen not found... Using \$RANDOM to generate passwords\n\n"
|
104
|
106
|
rnd_pass_cmd='echo $RANDOM'
|
105
|
107
|
fi
|
106
|
108
|
|