Add more info about script progression

This commit is contained in:
Josué Tille 2019-09-10 22:50:07 +02:00
parent 441deca3aa
commit bdcf138aff
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
3 changed files with 9 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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