1
0
Fork 0
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:
Tio 2023-08-21 01:54:04 +02:00 committed by GitHub
parent 8f209fc518
commit a096a7eb3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)."