create db and user:
app=$1
dbuser=$app
dbname=$app
sudo su --login postgres << EOF
createuser --echo ${dbuser};
createdb --echo --owner ${dbuser} ${dbname};
EOF
reload:
sudo su -l postgres -c "pg_ctl reload"
create db and user:
app=$1
dbuser=$app
dbname=$app
sudo su --login postgres << EOF
createuser --echo ${dbuser};
createdb --echo --owner ${dbuser} ${dbname};
EOF
reload:
sudo su -l postgres -c "pg_ctl reload"