forked from SEDISH/openxds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmd.sh
27 lines (20 loc) · 955 Bytes
/
cmd.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
#!/bin/bash
set -e
export PGPASSWORD=openxds
# if [[ ! -z `psql -h postgresql-openxds -p 5432 -U postgres -lqt | cut -d \| -f 1 | grep -w 'openxds'` ]]; then
# echo "# Database OpenXDS exists #"
# else
# echo "# Init OpenXDS Database #"
# psql -h postgresql-openxds -p 5432 -U postgres -c "CREATE USER openxds SUPERUSER PASSWORD 'openxds'"
# psql -h postgresql-openxds -p 5432 -U postgres -c "CREATE DATABASE openxds OWNER 'openxds'";
# psql -h postgresql-openxds -p 5432 -d openxds -U openxds -f /opt/openxds/misc/create_database_schema_postgres.sql
# fi
# if [[ ! -z `psql -h postgresql-openxds -p 5432 -U postgres -lqt | cut -d \| -f 1 | grep -w 'log2'` ]]; then
# echo "# Database log2 exists #"
# else
# echo "# Init log2 Database#"
# psql -h postgresql-openxds -p 5432 -U openxds -f /opt/openxds/misc/create_database_schema_log2_postgres.sql
# fi
echo "# Start OpenXDS #"
cd /opt/openxds/
java -jar /opt/openxds/openxds-1.1.2.jar