#!/bin/bash # Source local helpers source ./_common.sh # Source app helpers source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME dbname=$app dbuser=$app # Drop MySQL database and user ynh_mysql_drop_db "$dbname" ynh_mysql_drop_user "$dbuser" # Retrieve domain from app settings domain=$(ynh_app_setting_get "$app" domain) # Delete app directory and configurations ynh_secure_remove "/var/www/${app}" ynh_secure_remove "/etc/php5/fpm/pool.d/${app}.conf" ynh_secure_remove "/etc/nginx/conf.d/${domain}.d/${app}.conf" # Reload services service php5-fpm restart service nginx reload