#!/bin/bash

domain=$(sudo yunohost app setting my_webapp domain)

sudo service pure-ftpd-ldap stop
sudo apt-get remove -y -qq pure-ftpd-ldap pure-ftpd-common
sudo yunohost service remove pure-ftpd-ldap

sudo rm -rf /var/www/my_webapp
sudo rm -f /etc/nginx/conf.d/$domain.d/my_webapp.conf
sudo rm -f /etc/php5/fpm/pool.d/my_webapp.conf

sudo service nginx reload
sudo yunohost app ssowatconf
