Commit 41ef9e43a9dd86a733caeb63167bebf577c0f46c

Authored by Alexis Gavoty
1 parent 56148d96a2
Exists in master

Update remove

Showing 1 changed file with 2 additions and 0 deletions Inline Diff

1 #!/bin/bash 1 #!/bin/bash
2 2
3 db_user=owncloud 3 db_user=owncloud
4 db_name=owncloud 4 db_name=owncloud
5 root_pwd=$(sudo cat /etc/yunohost/mysql) 5 root_pwd=$(sudo cat /etc/yunohost/mysql)
6 domain=$(sudo yunohost app setting owncloud domain) 6 domain=$(sudo yunohost app setting owncloud domain)
7 7
8 mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;" 8 mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;"
9 sudo rm -rf /var/www/owncloud 9 sudo rm -rf /var/www/owncloud
10 sudo rm -f /etc/nginx/conf.d/$domain.d/owncloud.conf 10 sudo rm -f /etc/nginx/conf.d/$domain.d/owncloud.conf
11 sudo rm -f /etc/php5/fpm/pool.d/owncloud.conf 11 sudo rm -f /etc/php5/fpm/pool.d/owncloud.conf
12 sudo service php5-fpm restart
12 sudo userdel owncloud > /dev/null 2>&1 13 sudo userdel owncloud > /dev/null 2>&1
14 sudo service nginx reload
13 15