#!/bin/bash #================================================= # GENERIC STARTING #================================================= # IMPORT GENERIC HELPERS #================================================= source _common.sh source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) #================================================= # STANDARD REMOVE #================================================= # STOP AND REMOVE SERVICE #================================================= # Delete uwsgi configuration ynh_systemd_action --action=stop --service_name=uwsgi if [ -h "/etc/uwsgi/apps-enabled/radicale.ini" ]; then echo "Delete uwsgi config" ynh_secure_remove "/etc/uwsgi/apps-enabled/radicale.ini" fi ynh_secure_remove "/etc/uwsgi/apps-available/radicale.ini" #================================================= # REMOVE DEPENDENCIES #================================================= # Remove metapackage and its dependencies ynh_remove_app_dependencies #================================================= # REMOVE APP MAIN DIR #================================================= ynh_secure_remove "/var/www/$app" ynh_secure_remove "/opt/yunohost/$app" #================================================= # REMOVE NGINX CONFIGURATION #================================================= # Remove the dedicated nginx config ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= # Remove the dedicated php-fpm config ynh_remove_fpm_config #================================================= # REMOVE LOGROTATE CONFIG #================================================= # Remove the app-specific logrotate config ynh_remove_logrotate #================================================= # SPECIFIC REMOVE #================================================= # REMOVE RADICALE CONFIG #================================================= ynh_secure_remove "/etc/$app" #================================================= # REMOVE SERVICE FROM ADMIN PANEL #================================================= if [ -e /etc/init.d/uwsgi ] then # Restart uwsgi service ynh_systemd_action --action=start --service_name=uwsgi else # Check if the service is declared in YunoHost if yunohost service status | grep -q uwsgi then ynh_print_info "Remove uwsgi service" >&2 yunohost service remove uwsgi fi fi #================================================= # GENERIC FINALISATION #================================================= # REMOVE DEDICATED USER #================================================= ynh_system_user_delete $app