#!/bin/bash # Source app helpers . /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= # Exit if an error occurs during the execution of the script ynh_abort_if_errors app=$YNH_APP_INSTANCE_NAME db_user=$app db_name=$app domain=$(ynh_app_setting_get $app domain) ynh_mysql_drop_db $db_name ynh_mysql_drop_user $db_user sudo rm -rf /var/www/$app sudo rm -rf /etc/cron.d/$app sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf sudo rm -f /etc/php/7.0/fpm/pool.d/$app.conf sudo service nginx reload sudo service php7.0-fpm reload sudo yunohost app ssowatconf