File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,20 @@ $STD apt-get install -y \
2727msg_ok " Installed Dependencies"
2828
2929
30- msg_info " Configuring MySQL"
30+ msg_info " Configuring Database"
31+ DB_NAME=ghost
32+ DB_USER=ghostuser
3133DB_PASS=$( openssl rand -base64 18 | tr -dc ' a-zA-Z0-9' | head -c13)
32- $STD mysql -u root -e " ALTER USER 'root'@'localhost' IDENTIFIED WITH 'mysql_native_password' BY '$DB_PASS ';"
33- $STD mysql -u root -p" $DB_PASS " -e " FLUSH PRIVILEGES;"
34+ mariadb -u root -e " CREATE DATABASE $DB_NAME ;"
35+ mariadb -u root -e " CREATE USER '$DB_USER '@'localhost' IDENTIFIED BY '$DB_PASS ';"
36+ mariadb -u root -e " GRANT ALL ON $DB_NAME .* TO '$DB_USER '@'localhost'; FLUSH PRIVILEGES;"
37+
3438{
35- echo " MySQL-Credentials"
36- echo " Username: root"
37- echo " Password: $DB_PASS "
38- } >> ~ /mysql.creds
39+ echo " Ghost-Credentials"
40+ echo " Ghost Database User: $DB_USER "
41+ echo " Ghost Database Password: $DB_PASS "
42+ echo " Ghost Database Name: $DB_NAME "
43+ } >> ~ /ghost.creds
3944msg_ok " Configured MySQL"
4045
4146msg_info " Setting up Node.js Repository"
You can’t perform that action at this time.
0 commit comments