skip if already started
This commit is contained in:
parent
97fbc64f78
commit
f35c18027e
@ -1,4 +1,10 @@
|
||||
#!/bin/sh
|
||||
if [ -f data/db/postmaster.pid ]
|
||||
then
|
||||
echo "already started"
|
||||
exit
|
||||
fi
|
||||
|
||||
INIT=0
|
||||
if [ ! -d data/db ]
|
||||
then
|
||||
@ -6,7 +12,9 @@ then
|
||||
initdb --locale=C -E UTF-8 data/db
|
||||
INIT=1
|
||||
fi
|
||||
|
||||
pg_ctl -D data/db -l data/db.log start
|
||||
|
||||
if [ "$INIT" == "1" ]
|
||||
then
|
||||
sleep 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user