mirror of
https://github.com/bitnami/containers.git
synced 2026-03-09 15:40:15 +08:00
display application credentials even when TOMCAT_PASSWORD is not specified
This commit is contained in:
@@ -8,3 +8,11 @@ initialize_tomcat_webapps() {
|
||||
ln -sf $BITNAMI_APP_DIR/webapps.defaults/$f /app/
|
||||
done
|
||||
}
|
||||
|
||||
print_tomcat_password() {
|
||||
if [ -z $TOMCAT_PASSWORD ]; then
|
||||
echo "**none**"
|
||||
else
|
||||
echo $TOMCAT_PASSWORD
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ if [ ! "$(ls -A $BITNAMI_APP_VOL_PREFIX/conf)" ]; then
|
||||
echo ""
|
||||
echo "Setting manager password in tomcat-users.xml ..."
|
||||
sed -i 's/^<user username="manager" password=""/username="manager" password="'"$TOMCAT_PASSWORD"'"/' $BITNAMI_APP_VOL_PREFIX/conf/tomcat-users.xml
|
||||
print_app_credentials $BITNAMI_APP_NAME manager $TOMCAT_PASSWORD
|
||||
fi
|
||||
print_app_credentials $BITNAMI_APP_NAME manager `print_tomcat_password`
|
||||
else
|
||||
print_container_already_initialized $BITNAMI_APP_NAME
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user