mirror of
https://github.com/YunoHost-Apps/friendica_ynh.git
synced 2024-09-03 18:36:14 +02:00
Put Friendica in maintenance mode
If we do not put Friendica in maintenance mode before we backup, then the backups will fail if you have an active instance. New entries will add up in the database before it finishes dumping it.
This commit is contained in:
parent
8f209fc518
commit
a096a7eb3b
1 changed files with 8 additions and 0 deletions
|
@ -21,6 +21,10 @@ ynh_clean_setup () {
|
|||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
# Put Friendica in maintenance mode
|
||||
cd /var/www/friendica
|
||||
bin/console maintenance 1
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
|
@ -74,4 +78,8 @@ ynh_mysql_dump_db --database="$db_name" > db.sql
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
# Disable the Friendica maintenance mode
|
||||
cd /var/www/friendica
|
||||
bin/console maintenance 0
|
||||
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
|
|
Loading…
Add table
Reference in a new issue