%PDF- %PDF-
| Direktori : /opt/bitnami/var/init/pre-start/ |
| Current File : /opt/bitnami/var/init/pre-start/080_get_default_passwords |
#!/bin/sh
#
# Get the default password that will be used for all services and applications
# Copyright 2020 Bitnami.com All Rights Reserved
#
. /opt/bitnami/scripts/init/functions
# when run with --force option, set the password regardless of flag
if [ "x$1" != "x--force" ] ; then
run_once_globally_check "get_default_passwords"
if [ $? -ne 0 ]; then
exit 0
fi
fi
# get if password should be modified
APPUSER="user"
PASSWD="`get_applications_password`"
if [ "x$PASSWD" = "x" ] ; then
exit 0
fi
# log at start as well since when changing takes long time to complete,
# get console output may not show the full log
echo ""
echo "#########################################################################"
echo "# #"
(
echo "# Setting Bitnami application password to '${PASSWD}' #"
if [ "x$APPUSER" != "x" ]; then
echo "# (the default application username is '${APPUSER}') #"
fi
) | sed 's/^#\(.\{71\}\)\s*#/#\1#/g' # Limits the horizontal size of the box
echo "# #"
echo "#########################################################################"
echo ""