symlink contents of `$BITNAMI_APP_DIR/webapps.defaults/` instead of copying them to `/app/`

This commit is contained in:
Sameer Naik 2015-08-13 10:27:54 +05:30
parent fdf500092f
commit f888cb7e2a
2 changed files with 5 additions and 4 deletions

View File

@ -3,5 +3,8 @@
initialize_tomcat_webapps() {
echo "==> Initializing Tomcat webapps directory..."
echo ""
cp -a $BITNAMI_APP_DIR/webapps.defaults/* /app/
for f in $(ls $BITNAMI_APP_DIR/webapps.defaults/)
do
ln -sf $BITNAMI_APP_DIR/webapps.defaults/$f /app/
done
}

View File

@ -28,9 +28,7 @@ chown -R $BITNAMI_APP_USER:$BITNAMI_APP_USER $BITNAMI_APP_VOL_PREFIX/conf/ $BITN
if [ "$1" = 'catalina.sh' ]; then
set -- $@ $EXTRA_OPTIONS
if [ ! -d /app/manager ]; then
initialize_tomcat_webapps
fi
initialize_tomcat_webapps
exec gosu $BITNAMI_APP_USER "$@"
else