fix managedb

This commit is contained in:
Motiejus Jakštys 2019-10-26 15:14:50 +03:00
parent 88503ff1cf
commit 409b522f89

View File

@ -5,8 +5,11 @@ if [[ $1 == init ]]; then
mkdir -p db && initdb db
pg_ctl -D db -l db/logfile start
psql -c 'CREATE EXTENSION postgis;'
psql < init.sql
psql postgres \
-c 'CREATE DATABASE airportgames;'
psql -d airportgames \
-c 'CREATE EXTENSION postgis;'
psql -d airportgames < init.sql
fi
if [[ $1 == start ]]; then