2016-03-18 18:38:54 +01:00
|
|
|
#!/bin/bash
|
|
|
|
app=sogo
|
|
|
|
|
|
|
|
# Retrieve arguments
|
|
|
|
domain=$(sudo yunohost app setting $app domain)
|
|
|
|
path=$(sudo yunohost app setting $app path)
|
|
|
|
admin=$(sudo yunohost app setting $app admin)
|
|
|
|
is_public=$(sudo yunohost app setting $app is_public)
|
|
|
|
|
|
|
|
|
|
|
|
# Remove configuration files
|
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
|
|
|
|
# If a database is used, remove it
|
|
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE $app ; DROP USER $app@localhost ;"
|
|
|
|
|
2016-03-18 21:00:30 +01:00
|
|
|
sudo rm /etc/apt/sources.list.d/yunohost.list
|
|
|
|
sudo apt-get update
|
2016-03-18 21:02:38 +01:00
|
|
|
sudo apt-get remove sogo
|
2016-03-18 21:00:30 +01:00
|
|
|
|
|
|
|
|
2016-03-18 18:38:54 +01:00
|
|
|
# Restart services
|
|
|
|
sudo service nginx reload
|
|
|
|
sudo yunohost app ssowatconf
|