Fix database name in email

master
Blade of Darkness 8 months ago
parent 14c099b5fb
commit fb849b1032
  1. 2
      include/dbemail.tmpl
  2. 4
      makedb

@ -3,5 +3,5 @@ Hello _username_;
Your database has been provisioned. Information below should be used to connect to it:
Database name: _username_
Database user: _username_
Database user: _databasename_
Password: _password_

@ -20,6 +20,6 @@ then
echo -e "usage: $(basename $0) <user name> [database name]"
else
database_create
sed -e "s/_username_/$USER/g" -e "s/_password_/$PASSWORD/g" include/dbemail.tmpl | sudo mail -s "Your database has been provisioned" $USER@thunix.net
sed -e "s/_username_/$USER/g" -e "s/_password_/$PASSWORD/g" include/dbemail.tmpl | sudo mail -s "Your database has been provisioned" $ADMIN_EMAIL
sed -e "s/_username_/$USER/g" -e "s/_databasename_/$DATABASE/g" -e "s/_password_/$PASSWORD/g" include/dbemail.tmpl | sudo mail -s "Your database has been provisioned" $USER@thunix.net
sed -e "s/_username_/$USER/g" -e "s/_databasename_/$DATABASE/g" -e "s/_password_/$PASSWORD/g" include/dbemail.tmpl | sudo mail -s "Your database has been provisioned" $ADMIN_EMAIL
fi