#!/bin/bash #================================================= # GENERIC STARTING #================================================= # IMPORT GENERIC HELPERS #================================================= source _common.sh source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= app=$YNH_APP_INSTANCE_NAME port=$(ynh_app_setting_get $app port) # Retrieve app settings domain=$(ynh_app_setting_get $app domain) final_path=$(ynh_app_setting_get $app final_path) #================================================= # STANDARD REMOVE #================================================= # STOP AND REMOVE SERVICE #================================================= # Remove the dedicated systemd config ynh_remove_systemd_config #================================================= # REMOVE SERVICE FROM ADMIN PANEL #================================================= # Remove a service from the admin panel, added by `yunohost service add` if yunohost service status | grep -q $app then echo "Remove $app service" yunohost service remove $app fi #================================================= # REMOVE NODEJS #================================================= ynh_remove_nodejs #================================================= # REMOVE APP MAIN DIR #================================================= # Remove the app directory securely ynh_secure_remove "$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= # Remove the dedicated nginx config ynh_remove_nginx_config #================================================= # REMOVE THE NGINX CONFIGURATION #================================================= ynh_remove_nginx_config # Remove the dedicated nginx config #================================================= # REMOVE THE LOGROTATE CONFIG #================================================= ynh_remove_logrotate # Remove the app-specific logrotate config #================================================= # GENERIC FINALIZATION #================================================= # REMOVE DEDICATED USER #================================================= ynh_system_user_delete $app