2015-08-03 12:05:52 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
db_user=movim
|
|
|
|
db_name=movim
|
|
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;"
|
|
|
|
|
|
|
|
# Removing executable files
|
|
|
|
sudo rm -rf /var/www/movim
|
|
|
|
domain=$(sudo yunohost app setting movim domain)
|
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/movim.conf
|
|
|
|
|
|
|
|
#REMOVE INIT
|
2015-08-03 12:07:36 +02:00
|
|
|
sudo /etc/init.d/movim stop
|
2015-08-04 10:50:43 +02:00
|
|
|
sudo systemctl stop movim
|
|
|
|
sudo systemctl disable movim
|
|
|
|
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
|
|
|
|
|
|
|
# Restarting services
|
|
|
|
sudo service nginx reload
|