Add ynh_script_progression somewhere

This commit is contained in:
Josué Tille
2019-09-10 22:43:45 +02:00
parent 3a6e4b46d7
commit 3a66c7b87b
6 changed files with 71 additions and 23 deletions

View File

@ -15,6 +15,7 @@ source ../settings/scripts/experimental_helper.sh
source ../settings/scripts/_common.sh
# Retrieve app settings
ynh_script_progression --message="Loading installation settings..."
domain=$(ynh_app_setting_get --app $app --key domain)
#=================================================
@ -22,17 +23,23 @@ domain=$(ynh_app_setting_get --app $app --key domain)
#=================================================
# Copy the app source files
ynh_script_progression --message="Backing up code..." --weight=3
ynh_backup --src_path "$final_path"
# Copy the data files
ynh_script_progression --message="Backing up user data..." --weight=10
ynh_backup --src_path "$DATADIR"
ynh_script_progression --message="Backing up configuration..."
# Copy the conf files
ynh_backup --src_path "/etc/nginx/conf.d/${domain}.d/${app}.conf"
ynh_backup --src_path "/etc/systemd/system/${app}.service"
# Backup logs
ynh_script_progression --message="Backing up logs..."
ynh_backup --src_path "/var/log/$app"
# Dump the database
ynh_script_progression --message="Backing up database"
ynh_mysql_dump_db "$dbname" > ./db.sql