-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathpost-install.sh
28 lines (22 loc) · 1.17 KB
/
post-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
cd $BITNAMI_APP_DIR
# create user home
mkdir -m 0755 -p /home/${BITNAMI_APP_USER}
chown -R ${BITNAMI_APP_USER}: /home/${BITNAMI_APP_USER}
# set up default config
mkdir -p $BITNAMI_APP_DIR/conf.defaults
mv $BITNAMI_APP_DIR/standalone/configuration $BITNAMI_APP_DIR/conf.defaults/standalone
mv $BITNAMI_APP_DIR/domain/configuration $BITNAMI_APP_DIR/conf.defaults/domain
# symlinks to maintain compatibility of command-line utilities (eg. add-user.sh)
ln -sf $BITNAMI_APP_DIR/conf/standalone $BITNAMI_APP_DIR/standalone/configuration
ln -sf $BITNAMI_APP_DIR/conf/domain $BITNAMI_APP_DIR/domain/configuration
# set up default datadir
mkdir -p $BITNAMI_APP_DIR/data.defaults
mv $BITNAMI_APP_DIR/standalone $BITNAMI_APP_DIR/domain $BITNAMI_APP_DIR/data.defaults/
# symlinks to maintain compatibility of command-line utilities (eg. add-user.sh)
ln -sf $BITNAMI_APP_DIR/data/standalone $BITNAMI_APP_DIR/standalone
ln -sf $BITNAMI_APP_DIR/data/domain $BITNAMI_APP_DIR/domain
# symlink mount points at root to install dir
ln -s $BITNAMI_APP_DIR/conf $BITNAMI_APP_VOL_PREFIX/conf
ln -s $BITNAMI_APP_DIR/logs $BITNAMI_APP_VOL_PREFIX/logs
ln -s $BITNAMI_APP_DIR/data $BITNAMI_APP_VOL_PREFIX/data