2015-06-25 23:42:02 +02:00
|
|
|
#!/bin/sh
|
2015-02-17 03:39:33 +01:00
|
|
|
|
|
|
|
db_user=diaspora
|
2015-02-18 23:07:41 +01:00
|
|
|
db_name=diaspora_production
|
2015-02-17 03:39:33 +01:00
|
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
|
|
domain=$(sudo yunohost app setting diaspora domain)
|
2015-03-01 23:06:20 +01:00
|
|
|
full_path=$(sudo yunohost app setting diaspora final_path)
|
2015-02-17 03:39:33 +01:00
|
|
|
|
2015-02-17 11:13:33 +01:00
|
|
|
sudo service diaspora_ynh stop
|
2015-02-17 03:39:33 +01:00
|
|
|
|
|
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;"
|
|
|
|
|
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/diaspora.conf
|
|
|
|
|
|
|
|
sudo service nginx reload
|
|
|
|
|
2015-03-01 23:06:20 +01:00
|
|
|
sudo killall -u diaspora
|
|
|
|
sleep 5
|
|
|
|
sudo deluser --force --remove-home diaspora
|
|
|
|
sudo rm -rf $full_path
|
2015-02-17 03:39:33 +01:00
|
|
|
|
2015-02-17 11:13:33 +01:00
|
|
|
sudo update-rc.d -f diaspora_ynh remove
|
|
|
|
sudo rm -f /etc/init.d/diaspora_ynh
|