From 409b522f890deda24ef4ccd5347dfb72e4eb51ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 26 Oct 2019 15:14:50 +0300 Subject: [PATCH] fix managedb --- MTM/task4-straipsnis/managedb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MTM/task4-straipsnis/managedb b/MTM/task4-straipsnis/managedb index 3fcb2af..c08ad32 100755 --- a/MTM/task4-straipsnis/managedb +++ b/MTM/task4-straipsnis/managedb @@ -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