forked from team/makeuser
17 lines
445 B
Bash
Executable File
17 lines
445 B
Bash
Executable File
#!/bin/bash
|
|
|
|
CONFIG=./setenv
|
|
. $CONFIG
|
|
. include/functions.DB
|
|
|
|
USER=$1
|
|
DATABASE=$1
|
|
PASSWORD=`pwgen -1B 24`
|
|
|
|
#adding a new database
|
|
create_database
|
|
|
|
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
|
|
|