move first semester to first semester
This commit is contained in:
22
I/MTM/task4-straipsnis/managedb
Executable file
22
I/MTM/task4-straipsnis/managedb
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -xeuo pipefail
|
||||
|
||||
if [[ $1 == init ]]; then
|
||||
mkdir -p db && initdb db
|
||||
pg_ctl -D db -l db/logfile start
|
||||
|
||||
psql postgres \
|
||||
-c 'CREATE DATABASE airportgames;'
|
||||
psql -d airportgames \
|
||||
-c 'CREATE EXTENSION postgis;'
|
||||
psql -d airportgames < init.sql
|
||||
fi
|
||||
|
||||
if [[ $1 == start ]]; then
|
||||
pg_ctl -D db -l db/logfile start
|
||||
fi
|
||||
|
||||
|
||||
if [[ $1 == stop ]]; then
|
||||
pg_ctl -D db -l db/logfile stop
|
||||
fi
|
||||
Reference in New Issue
Block a user