move database option to mysql section

This commit is contained in:
Matthew Saunders Brown 2023-03-18 16:36:33 -07:00
parent 7bc3188cb3
commit e4e4d4e47a

View File

@ -80,9 +80,10 @@ if [[ -n $write ]]; then
chmod 640 /srv/www/$domain/.my.cnf chmod 640 /srv/www/$domain/.my.cnf
echo '[client]' > /srv/www/$domain/.my.cnf echo '[client]' > /srv/www/$domain/.my.cnf
echo "host=127.0.0.1" >> /srv/www/$domain/.my.cnf echo "host=127.0.0.1" >> /srv/www/$domain/.my.cnf
echo "database=$database" >> /srv/www/$domain/.my.cnf
echo "user=$username" >> /srv/www/$domain/.my.cnf echo "user=$username" >> /srv/www/$domain/.my.cnf
echo "password=$password" >> /srv/www/$domain/.my.cnf echo "password=$password" >> /srv/www/$domain/.my.cnf
echo '[mysql]' >> /srv/www/$domain/.my.cnf
echo "database=$database" >> /srv/www/$domain/.my.cnf
touch /home/$vhost_username/.my.cnf touch /home/$vhost_username/.my.cnf
chown $vhost_username:$vhost_username /home/$vhost_username/.my.cnf chown $vhost_username:$vhost_username /home/$vhost_username/.my.cnf
chmod 640 /home/$vhost_username/.my.cnf chmod 640 /home/$vhost_username/.my.cnf