Remove database install script
Use InstallDatabase.php instead
This commit is contained in:
parent
1e099212d4
commit
56303443ea
18
bin/init
18
bin/init
@ -10,24 +10,6 @@ else
|
||||
locale-gen
|
||||
fi
|
||||
|
||||
echo "Configuring database"
|
||||
RETRIES=5
|
||||
|
||||
until psql -c "select 1" > /dev/null 2>&1 || [ $RETRIES -eq 0 ]; do
|
||||
echo "Waiting for postgres server, $((RETRIES--)) remaining attempts..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
|
||||
DB_EXISTS=`psql -l | grep ${PGDATABASE} | wc -l`
|
||||
|
||||
echo 'Database '$DB_EXISTS
|
||||
if [ "$DB_EXISTS" -gt "0" ]; then
|
||||
psql -f /usr/src/rosariosis/rosariosis.sql
|
||||
else
|
||||
echo "Database does not exists"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
|
Loading…
x
Reference in New Issue
Block a user