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

19 lines
435 B
Text
Raw Normal View History

2015-09-29 02:28:53 +02:00
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