mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-02-01 17:31:49 +00:00
Update ghost-install.sh
This commit is contained in:
parent
5855cff8e4
commit
376fd6522a
@ -27,15 +27,20 @@ $STD apt-get install -y \
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
|
||||
msg_info "Configuring MySQL"
|
||||
msg_info "Configuring Database"
|
||||
DB_NAME=ghost
|
||||
DB_USER=ghostuser
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH 'mysql_native_password' BY '$DB_PASS';"
|
||||
$STD mysql -u root -p"$DB_PASS" -e "FLUSH PRIVILEGES;"
|
||||
mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
|
||||
{
|
||||
echo "MySQL-Credentials"
|
||||
echo "Username: root"
|
||||
echo "Password: $DB_PASS"
|
||||
} >> ~/mysql.creds
|
||||
echo "Ghost-Credentials"
|
||||
echo "Ghost Database User: $DB_USER"
|
||||
echo "Ghost Database Password: $DB_PASS"
|
||||
echo "Ghost Database Name: $DB_NAME"
|
||||
} >> ~/ghost.creds
|
||||
msg_ok "Configured MySQL"
|
||||
|
||||
msg_info "Setting up Node.js Repository"
|
||||
|
Loading…
x
Reference in New Issue
Block a user