From: Jean-Marc Pigeon (Delson) Date: Mon, 23 Jun 2025 23:38:58 +0000 (-0400) Subject: crdb.sh working for mysql X-Git-Tag: tag-0.9~4 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=e1ea22e4467be994e891f8346dffbc39a73fdfc5;p=jmp%2Fmailleur crdb.sh working for mysql --- diff --git a/support/crdb.sh b/support/crdb.sh index 4de10af..694486d 100755 --- a/support/crdb.sh +++ b/support/crdb.sh @@ -76,11 +76,10 @@ case "$DB_TYPE" in echo "CREATE ROLE $APPNAME WITH LOGIN CREATEDB SUPERUSER;" echo "CREATE ROLE apache WITH LOGIN;" echo "CREATE ROLE dovecot WITH LOGIN;" - echo "CREATE DATABSE $APPNAME;" - ) | $SQL $SQLHOST $SQLPORT template1 >> $LOG + echo "CREATE DATABASE $APPNAME;" + ) | /usr/bin/su - -m postgres -c "$SQL $SQLHOST $SQLPORT template1" >> $LOG echo "data-base is now created" >> $LOG fi - ) | $SQL >> $LOG ;; "*" ) #undefined database type at that stage?