2014-08-07 02:57:24 +02:00
|
|
|
#!/bin/bash
|
|
|
|
domain=$(sudo yunohost app setting seafile domain)
|
2015-02-10 14:42:32 +01:00
|
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
2014-08-07 02:57:24 +02:00
|
|
|
|
2015-02-10 14:42:32 +01:00
|
|
|
sudo service seafile-server stop
|
2014-08-07 04:42:27 +02:00
|
|
|
|
2015-03-18 18:07:50 +01:00
|
|
|
# remove sso config to unprotect domain.tld/seafhttp in /etc/ssowat/conf.json.persistent
|
|
|
|
sudo python /var/www/seafile/remove_sso_conf.py
|
|
|
|
|
2014-08-07 02:57:24 +02:00
|
|
|
sudo rm -rf /var/www/seafile
|
2014-08-12 03:18:09 +02:00
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/seafile.conf
|
|
|
|
sudo rm -f /etc/init.d/seafile-server
|
2015-02-10 14:42:32 +01:00
|
|
|
sudo rm -rf /home/yunohost.app/seafile-data
|
|
|
|
|
|
|
|
# Remove databases
|
|
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE ccnetdb ; DROP DATABASE seafiledb ; DROP DATABASE seahubdb ; DROP USER seafile@localhost ;"
|
2014-08-13 03:21:47 +02:00
|
|
|
|
2014-08-15 02:22:39 +02:00
|
|
|
ccnet_port=$(sudo yunohost app setting seafile ccnet_port)
|
|
|
|
seafile_port=$(sudo yunohost app setting seafile seafile_port)
|
|
|
|
|
2014-08-15 03:10:10 +02:00
|
|
|
sudo yunohost firewall disallow $ccnet_port
|
|
|
|
sudo yunohost firewall disallow $seafile_port
|
2015-02-10 14:42:32 +01:00
|
|
|
|
2015-03-17 01:15:44 +01:00
|
|
|
sudo yunohost service remove seafile-server
|
|
|
|
|
2015-02-10 14:42:32 +01:00
|
|
|
# Restart services
|
|
|
|
sudo service nginx reload
|
|
|
|
sudo yunohost app ssowatconf
|