1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dolibarr_ynh.git synced 2024-09-03 18:35:53 +02:00

[enh] add remove script

This commit is contained in:
Laurent Peuch 2015-09-29 02:28:53 +02:00
parent 96f8c0b787
commit a463e0e330

18
scripts/remove Normal file
View file

@ -0,0 +1,18 @@
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