diff --git a/scripts/backup b/scripts/backup index daeda89..f081cdb 100644 --- a/scripts/backup +++ b/scripts/backup @@ -31,7 +31,7 @@ ynh_script_progression --message="Backing up code..." --weight=3 ynh_backup --src_path $final_path ynh_script_progression --message="Backing up user data..." --weight=10 ynh_backup --src_path /home/yunohost.app/seafile-data --dest_path "data" -ynh_script_progression --message="Backing configuration..." +ynh_script_progression --message="Backing up configuration..." ynh_backup --src_path /etc/nginx/conf.d/$domain.d/${app}.conf ynh_backup --src_path /etc/systemd/system/seafile.service ynh_backup --src_path /etc/systemd/system/seahub.service @@ -39,7 +39,7 @@ ynh_backup --src_path /etc/fail2ban/jail.d/$app.conf ynh_backup --src_path /etc/fail2ban/filter.d/$app.conf # Backup mysql -ynh_script_progression --message="Backing database" +ynh_script_progression --message="Backing up database" ynh_mysql_dump_db --database ccnetdb > ${YNH_CWD}/ccnetdb.dmp ynh_mysql_dump_db --database seafiledb > ${YNH_CWD}/seafiledb.dmp ynh_mysql_dump_db --database seahubdb > ${YNH_CWD}/seahubdb.dmp diff --git a/scripts/remove b/scripts/remove index c22efee..296cc2c 100644 --- a/scripts/remove +++ b/scripts/remove @@ -44,7 +44,7 @@ ynh_secure_remove --file=/var/log/seafile ynh_script_progression --message="Removing code..." ynh_secure_remove --file=/var/www/$app ynh_secure_remove --file=/opt/yunohost/$app -ynh_script_progression --message="Backing up user data..." --weight=10 +ynh_script_progression --message="Removing user data..." ynh_secure_remove --file=/home/yunohost.app/seafile-data ynh_secure_remove --file=/tmp/seahub_cache @@ -68,15 +68,17 @@ ynh_script_progression --message="Removing dependencies" --weight=10 ynh_remove_app_dependencies # Remove nginx config -ynh_script_progression --message="Removing configuration..." +ynh_script_progression --message="Removing nginx configuration..." ynh_remove_nginx_config # Remove logrotate ynh_remove_logrotate # Remove the dedicated fail2ban config +ynh_script_progression --message="Removing fail2ban configuration..." ynh_remove_fail2ban_config +ynh_script_progression --message="Removing seafile service..." yunohost service remove seafile yunohost service remove seahub diff --git a/scripts/restore b/scripts/restore index 424e7c9..4accbfd 100644 --- a/scripts/restore +++ b/scripts/restore @@ -36,6 +36,7 @@ ynh_script_progression --message="Restoring files..." --weight=10 ynh_restore # Create user +ynh_script_progression --message="Configuring system user..." ynh_system_user_create $seafile_user $final_path # Restore dependencies @@ -43,6 +44,7 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=5 install_dependance # Restore mysql dump +ynh_script_progression --message="Restoring database..." --weight=3 db_user=seafile ynh_mysql_setup_db --db_user $db_user --db_name ccnetdb --db_pwd "$db_pwd" ynh_mysql_setup_db --db_user $db_user --db_name seafiledb --db_pwd "$db_pwd" @@ -75,6 +77,7 @@ systemctl enable seafile systemctl enable seahub # Add Seafile to YunoHost's monitored services +ynh_script_progression --message="Register seafile service..." yunohost service add seafile yunohost service add seahub