From: Jean-Marc Pigeon (Delson) Date: Wed, 9 Jul 2025 19:11:20 +0000 (-0400) Subject: redirecting stderr log to $LOG within crdb.sh X-Git-Tag: tag-0.13~6 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=848921acfe555bc380ede686febd9de3ac51e334;p=jmp%2Fmailleur redirecting stderr log to $LOG within crdb.sh --- diff --git a/support/crdb.sh b/support/crdb.sh index 44f447e..7bbde2d 100755 --- a/support/crdb.sh +++ b/support/crdb.sh @@ -58,7 +58,7 @@ case "$DB_TYPE" in echo "FLUSH PRIVILEGES;" echo "CREATE DATABASE $APPNAME;" echo "ALTER DATABASE $APPNAME CHARACTER SET utf8;" - ) | $SQL >> $LOG + ) | $SQL >> $LOG 2>&1 /bin/echo "data-base is now created" >> $LOG fi ;; @@ -85,10 +85,9 @@ 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 "DROP EXTENSION IF EXISTS pgcrypto;" echo "CREATE EXTENSION IF NOT EXISTS pgcrypto;" echo "CREATE DATABASE $APPNAME ENCODING='UTF8';" - ) | /usr/bin/su - -m postgres -c "$SQL $SQLHOST $SQLPORT template1" >> $LOG + ) | /usr/bin/su - -m postgres -c "$SQL $SQLHOST $SQLPORT template1" >> $LOG 2>&1 echo "data-base is now created" >> $LOG fi ;;