set -e domain=$(sudo yunohost app setting dolibarr domain) root_pwd=$(sudo cat /etc/yunohost/mysql) db_name=dolibarr db_user=dolibarr mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;" final_path=/var/www/dolibarr sudo rm -rf $final_path sudo rm -f /etc/nginx/conf.d/$domain.d/dolibarr.conf sudo rm -f /etc/php5/fpm/pool.d/dolibarr.conf sudo service php5-fpm restart sudo service nginx reload