#!/bin/bash #================================================= # GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= source _common.sh source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= #================================================= # STANDARD REMOVE #================================================= # REMOVE THE POSTGRESQL DATABASE #================================================= # Remove a database if it exists, along with the associated user #================================================= # REMOVE APP MAIN DIR #================================================= # Remove the app directory securely #================================================= # REMOVE DATA DIR #================================================= # Remove the data directory if --purge option is used if [ "${YNH_APP_PURGE:-0}" -eq 1 ] then ynh_script_progression --message="Removing app data directory..." fi #================================================= # REMOVE NGINX CONFIGURATION #================================================= ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 # Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 # Remove the dedicated PHP-FPM config ynh_remove_fpm_config #================================================= # REMOVE DEPENDENCIES #================================================= # Remove metapackage and its dependencies #================================================= # SPECIFIC REMOVE #================================================= # REMOVE VARIOUS FILES #================================================= ynh_script_progression --message="Removing various files..." # Remove a cron file ynh_secure_remove --file="/etc/cron.d/$app" #================================================= # GENERIC FINALIZATION #================================================= # REMOVE DEDICATED USER #================================================= # Delete a system user #================================================= # END OF SCRIPT #================================================= ynh_script_progression --message="Removal of $app completed" --last