#!/bin/bash # Exit on command errors and treat unset variables as an error app=$YNH_APP_INSTANCE_NAME # Source app helpers source /usr/share/yunohost/helpers source .fonctions # Retrieve arguments dbuser=$app dbname=$app domain=$(ynh_app_setting_get "$app" domain) # Drop MySQL database and user ynh_mysql_drop_db "$dbname" 2>&1 || true ynh_mysql_drop_user "$dbuser" 2>&1 || true # Delete app directory and configurations using secure remove SECURE_REMOVE "/var/www/${app}" REMOVE_NGINX_CONF REMOVE_FPM_CONF # Remove GPG key sudo gpg --batch --delete-key --yes Rainloop # Reload services sudo service php5-fpm reload sudo service nginx reload