mirror of
https://github.com/YunoHost-Apps/diaspora_ynh.git
synced 2024-09-03 18:26:13 +02:00
28 lines
734 B
Bash
28 lines
734 B
Bash
#!/bin/sh
|
|
|
|
db_user=diaspora
|
|
db_name=diaspora_production
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
domain=$(sudo yunohost app setting diaspora domain)
|
|
full_path=$(sudo yunohost app setting diaspora final_path)
|
|
|
|
sudo service diaspora_ynh stop
|
|
|
|
#=================================================
|
|
# REMOVE THE MYSQL DATABASE
|
|
#=================================================
|
|
|
|
# Remove a database if it exists, along with the associated user
|
|
ynh_mysql_remove_db $db_name $db_name
|
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/diaspora.conf
|
|
|
|
sudo service nginx reload
|
|
|
|
sudo killall -u diaspora
|
|
sleep 5
|
|
sudo deluser --force --remove-home diaspora
|
|
sudo rm -rf $full_path
|
|
|
|
sudo update-rc.d -f diaspora_ynh remove
|
|
sudo rm -f /etc/init.d/diaspora_ynh
|