From 4df5b4b3edba06b0ac41ded225d9795e38d6d915 Mon Sep 17 00:00:00 2001 From: Kayou Date: Thu, 21 Feb 2019 12:45:27 +0100 Subject: [PATCH] remove: ynh_print_info --- scripts/remove | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/scripts/remove b/scripts/remove index 3b3051c..c85dd20 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,6 +12,8 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= +ynh_print_info "Loading installation settings..." + app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get $app final_path) @@ -36,6 +38,7 @@ fi #================================================= # STOP AND REMOVE SERVICE #================================================= +ynh_print_info "Stopping and removing the systemd service" # Remove the dedicated systemd config ynh_remove_systemd_config @@ -43,6 +46,7 @@ ynh_remove_systemd_config #================================================= # REMOVE APP MAIN DIR #================================================= +ynh_print_info "Removing app main directory" # Remove the app directory securely ynh_secure_remove "$final_path" @@ -50,6 +54,7 @@ ynh_secure_remove "$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= +ynh_print_info "Removing nginx web server configuration" # Remove the dedicated nginx config ynh_remove_nginx_config @@ -63,6 +68,7 @@ ynh_secure_remove "/var/log/$app.log" #================================================= # REMOVE LOGROTATE CONFIGURATION #================================================= +ynh_print_info "Removing logrotate configuration" # Remove the app-specific logrotate config ynh_remove_logrotate @@ -80,12 +86,30 @@ fi #================================================= # REMOVE DEPENDENCIES #================================================= +ynh_print_info "Removing dependencies" # Remove metapackage and its dependencies ynh_remove_app_dependencies #================================================= -# REMOVE THE PostgreSQL DATABASE +# REMOVE THE POSTGRESQL DATABASE +#================================================= +ynh_print_info "Removing the PostgreSQL database" + +ynh_psql_remove_db $db_name $db_user + +#================================================= +# GENERIC FINALIZATION +#================================================= +# REMOVE DEDICATED USER +#================================================= +ynh_print_info "Removing the dedicated system user" + +# Delete a system user +ynh_system_user_delete $app + +#================================================= +# END OF SCRIPT #================================================= -ynh_psql_remove_db $db_name $db_user \ No newline at end of file +ynh_print_info "Removal of $app completed"