#!/bin/bash # Exit on command errors and treat unset variables as an error set -u # Loads the generic functions usually used in the script source .fonctions # Source app helpers source /usr/share/yunohost/helpers # Get multi-instances specific variables app=$YNH_APP_INSTANCE_NAME # Retrieve app settings domain=$(ynh_app_setting_get "$app" domain) #================================================= # REMOVE DEPENDENCIES #================================================= # Remove metapackage and its dependencies ynh_remove_app_dependencies # Delete app directory and configurations SECURE_REMOVE '/var/www/$app' # Delete directory application sudo rm -f "/etc/php5/fpm/pool.d/${app}.conf" sudo rm -f "/etc/php5/fpm/conf.d/20-${app}.ini" [[ -n $domain ]] && sudo rm -f "/etc/nginx/conf.d/${domain}.d/${app}.conf" # Reload services sudo systemctl reload php5-fpm sudo systemctl reload nginx