LocChat/bin/create_db.sh

13 lines
253 B
Bash
Raw Normal View History

2021-12-03 20:31:24 -05:00
#!/bin/bash
source .env
echo "Creating db '$DATABASE_URL'"
pg_ctl status || pg_ctl start
{
createdb $DATABASE_URL && echo "Database '$DATABASE_URL' created successfully"
} || {
echo "Database '$DATABASE_URL' already exists, skipping creation."
}