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-09-03 17:24:46 +02:00
|
|
|
sudo service php5-fpm stop
|
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-09-10 16:37:25 +02:00
|
|
|
sudo rm -f /etc/init.d/movim
|
|
|
|
sudo rm -f /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
|
2015-09-07 15:28:09 +02:00
|
|
|
sudo rm /etc/php5/fpm/pool.d/movim.conf
|
2015-08-27 07:37:28 +02:00
|
|
|
|
2015-08-03 12:05:52 +02:00
|
|
|
# Restarting services
|
|
|
|
sudo service nginx reload
|
2015-09-03 17:24:46 +02:00
|
|
|
sudo service php5-fpm start
|