#!/bin/bash source _common.sh source /usr/share/yunohost/helpers #================================================= # STANDARD REMOVE #================================================= # REMOVE SERVICE FROM ADMIN PANEL #================================================= # Remove a service from the admin panel, added by `yunohost service add` if yunohost service status $app >/dev/null 2>&1 then ynh_script_progression "Removing $app service integration..." yunohost service remove $app fi #================================================= # STOP PYINVENTORY'S SERVICES #================================================= ynh_script_progression "Stopping and removing systemd service '$app'..." ynh_config_remove_systemd ##================================================= ## REMOVE REDIS DB ##================================================= ynh_redis_remove_db #================================================= # REMOVE APP MAIN DIR #================================================= ynh_script_progression "Removing app main directory..." # /var/www/$app/ ynh_safe_rm "$install_dir" # /home/yunohost.app/$app/ ynh_safe_rm "$data_dir" #================================================= # REMOVE NGINX CONFIGURATION #================================================= ynh_script_progression "Removing nginx web server configuration..." # Remove the dedicated nginx config ynh_config_remove_nginx #================================================= # REMOVE LOGROTATE CONFIGURATION #================================================= ynh_script_progression "Removing logrotate configuration..." # Remove the app-specific logrotate config ynh_config_remove_logrotate #================================================= # END OF SCRIPT #================================================= ynh_script_progression "Removal of $app completed"