1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/diaspora_ynh.git synced 2024-09-03 18:26:13 +02:00

Make linter happy about progress indicators

This commit is contained in:
Augustin Trancart 2020-05-03 14:38:50 +02:00
parent b760cb2af9
commit bf7152bc1e
4 changed files with 17 additions and 10 deletions

View file

@ -18,7 +18,7 @@ ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..." --weight=1
ynh_script_progression --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
@ -51,7 +51,7 @@ fi
#=================================================
# BACKUP CONF FILES
#=================================================
ynh_script_progression --message="Backup configuration files of Diaspora..." --weight=10
ynh_script_progression --message="Backup configuration files of Diaspora..."
ynh_backup --src_path="$final_path/diaspora/config/database.yml"
ynh_backup --src_path="$final_path/diaspora/config/diaspora.yml"

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Load settings"
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
@ -24,7 +24,7 @@ final_path=$(ynh_app_setting_get $app final_path)
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
ynh_script_progression --message="Remove services"
yunohost service remove $app.target
systemctl stop ${app}.target ${app}_sidekiq.service ${app}_web.service
systemctl disable ${app}.target ${app}_sidekiq.service ${app}_web.service
@ -48,20 +48,21 @@ fi
#=================================================
# REMOVE THE POSTGRESQL DATABASE
#=================================================
ynh_script_progression --message="Remove database"
# Remove a database if it exists, along with the associated user
ynh_psql_remove_db $db_name $db_name
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Remove app dependencies" --weight=10
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Remove nginx config"
# Remove the dedicated nginx config
ynh_remove_nginx_config
@ -69,7 +70,7 @@ ynh_remove_nginx_config
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Remove logrotate config"
# Remove the app-specific logrotate config
# TODO setup logrotate ?
ynh_remove_logrotate
@ -79,7 +80,7 @@ ynh_remove_logrotate
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_script_progression --message="Remove $app user"
# Delete a system user
# because we use gpg, sometimes rogue processes (gpg an d dirmngr) stays a bit,
# preventing the deletion of the user. Hence we kill all processes belonging to $app
@ -89,6 +90,7 @@ ynh_system_user_delete $app
#=================================================
# REMOVE APP MAIN DIR
#=================================================
ynh_script_progression --message="Remove $final_path"
# Remove the app directory securely
ynh_secure_remove "$final_path"

View file

@ -18,7 +18,7 @@ ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading settings..." --weight=1
ynh_script_progression --message="Loading settings..."
app=$YNH_APP_INSTANCE_NAME

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
# Retrieve arguments
@ -22,6 +22,11 @@ final_path=$(ynh_app_setting_get --app $app --key final_path)
ynh_abort_if_errors
#=================================================
# Check upgrade type
#=================================================
ynh_script_progression --message="Check upgrade type..."
upgrade_type=$(ynh_check_app_version_changed)
# nothing to do yet!!
if [ "$upgrade_type" == "UPGRADE_APP" ]