X-Git-Url: http://id.pley.net/postfix.git/blobdiff_plain/6e5d449e15a8544549b3d2c9b941f4e461f7e2e0..09fd1a8ed2f80a6d1349f83650c35dd0eef05c0d:/postfixadmin/setup-postfixadmin.sh?ds=sidebyside diff --git a/postfixadmin/setup-postfixadmin.sh b/postfixadmin/setup-postfixadmin.sh index 7fcb269..11630e0 100755 --- a/postfixadmin/setup-postfixadmin.sh +++ b/postfixadmin/setup-postfixadmin.sh @@ -9,6 +9,9 @@ if [[ -z "$( mysql -u root -e 'SHOW DATABASES LIKE "postfix"' )" ]]; then echo Creating \"postfix\" database. mysql -u root -e 'CREATE DATABASE postfix' mysql -u root -e 'GRANT ALL PRIVILEGES ON postfix.* TO "postfix"@"localhost"' + if [[ -n "$( mysql -u root -e 'SELECT User FROM mysql.user WHERE User = "dovecot"' )" ]]; then + mysql -u root -e 'GRANT ALL PRIVILEGES ON postfix.* TO "dovecot"@"localhost"' + fi mysql -u root -e 'FLUSH PRIVILEGES' fi @@ -30,4 +33,3 @@ if [[ postfixadmin.conf -nt /etc/httpd/conf.d/postfixadmin.conf ]]; then echo Configuring postfixadmin in Apache. sudo cp postfixadmin.conf /etc/httpd/conf.d/postfixadmin.conf fi -sudo yum install php-imap