forked from vmware-archive/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboot.sh
28 lines (17 loc) · 794 Bytes
/
boot.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
#use set to enable verbose output
set -euo pipefail
readonly CONF=WEB-INF/classes/database.properties
# change to directory where DaleCo WAR file was unpacked
cd /var/lib/tomcat/webapps/DaleCo
echo "current directory: " $PWD
echo "writing to file: " $CONF
echo "host=${DATABASE_HOST}" > $CONF
echo "user=${DATABASE_USER}" >> $CONF
echo "password=${DATABASE_PASSWORD}" >> $CONF
#sed -i -e "host#s#=${DATABASE_HOST}#" "$CONF"
#sed -i -e "user#s#=${DATABASE_USER}#" "$CONF"
#sed -i -e "password#s#=${DATABASE_PASSWORD}#" "$CONF"
# DATABASE_HOST: The hostname to use to connect to the database
# DATABASE_USER: The root username for the database. You can connect as this user and create other users if you require
# DATABASE_PASSWORD: The password for the root database user