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:
parent
96f8c0b787
commit
a463e0e330
1 changed files with 18 additions and 0 deletions
18
scripts/remove
Normal file
18
scripts/remove
Normal 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
|
Loading…
Add table
Reference in a new issue