Ghost restore database password
This commit is contained in:
parent
f99ed7f79f
commit
8f80033313
|
@ -234,6 +234,10 @@ function restore_local_ghost {
|
|||
function_check restore_database
|
||||
restore_database ghost ${GHOST_DOMAIN_NAME}
|
||||
|
||||
MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
|
||||
ghost_config=/var/www/${GHOST_DOMAIN_NAME}/htdocs/config.js
|
||||
sed -i "s|password :.*|password : '${MARIADB_PASSWORD}',|g" $ghost_config
|
||||
|
||||
systemctl start ghost
|
||||
restart_site
|
||||
fi
|
||||
|
@ -274,6 +278,11 @@ function restore_remote_ghost {
|
|||
ghost_create_database
|
||||
|
||||
restore_database_from_friend ghost ${GHOST_DOMAIN_NAME}
|
||||
|
||||
MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
|
||||
ghost_config=/var/www/${GHOST_DOMAIN_NAME}/htdocs/config.js
|
||||
sed -i "s|password :.*|password : '${MARIADB_PASSWORD}',|g" $ghost_config
|
||||
|
||||
systemctl start ghost
|
||||
restart_site
|
||||
chown -R ghost: /var/www/$GHOST_DOMAIN_NAME/htdocs/
|
||||
|
|
Loading…
Reference in New Issue