2015-08-03 12:05:52 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
db_user=movim
|
|
|
|
db_name=movim
|
|
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
|
|
|
2015-08-27 07:37:28 +02:00
|
|
|
#Stop service and remove init
|
2015-08-03 12:07:36 +02:00
|
|
|
sudo /etc/init.d/movim stop
|
2015-08-19 14:17:52 +02:00
|
|
|
sudo systemctl stop movim.service
|
|
|
|
sudo systemctl disable movim.service
|
2015-08-04 10:50:43 +02:00
|
|
|
sudo update-rc.d -f movim remove
|
2015-08-03 12:07:36 +02:00
|
|
|
sudo rm /etc/init.d/movim
|
2015-08-04 10:50:43 +02:00
|
|
|
sudo rm /lib/systemd/system/movim.service
|
2015-08-03 12:05:52 +02:00
|
|
|
|
2015-08-27 07:37:28 +02:00
|
|
|
#Drop database, movim files and user.
|
|
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;"
|
|
|
|
sudo userdel movim
|
|
|
|
sudo rm -rf /var/www/movim
|
|
|
|
domain=$(sudo yunohost app setting movim domain)
|
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/movim.conf
|
|
|
|
udo rm etc/php5/fpm/pool.d/movim.conf
|
|
|
|
|
2015-08-03 12:05:52 +02:00
|
|
|
# Restarting services
|
|
|
|
sudo service nginx reload
|
2015-08-27 07:37:28 +02:00
|
|
|
sudo service php5-fpm restart
|