replace use of bnconfig with sed to set the redis password

bnconfig takes approximately 10s to set the password which adds to the
container startup time.
This commit is contained in:
Sameer Naik
2015-11-10 11:58:21 +05:30
parent d8aec3cc18
commit 677081741b

View File

@@ -6,10 +6,8 @@ if [ ! "$(ls -A $BITNAMI_APP_VOL_PREFIX/conf)" ]; then
generate_conf_files $BITNAMI_APP_DIR/etc
if [ "$REDIS_PASSWORD" ]; then
echo "Setting password in /conf/redis.conf ..."
echo "# Disabled" > $BITNAMI_APP_DIR/scripts/ctl.sh
$BITNAMI_APP_DIR/bnconfig --userpassword $REDIS_PASSWORD
echo "Setting redis password ..."
sed -i 's/# requirepass .*/requirepass '"$REDIS_PASSWORD"'/' $BITNAMI_APP_DIR/etc/conf/redis.conf
print_app_credentials $BITNAMI_APP_NAME **none** $REDIS_PASSWORD
fi
else