mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
25bb354d14
Former-commit-id: 5ef86ebac4
28 lines
No EOL
922 B
Bash
28 lines
No EOL
922 B
Bash
#!/bin/bash
|
|
domain=$(sudo yunohost app setting seafile domain)
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
|
|
sudo service seafile-server stop
|
|
|
|
sudo rm -rf /var/www/seafile
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/seafile.conf
|
|
sudo rm -f /etc/init.d/seafile-server
|
|
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 ;"
|
|
|
|
ccnet_port=$(sudo yunohost app setting seafile ccnet_port)
|
|
seafile_port=$(sudo yunohost app setting seafile seafile_port)
|
|
|
|
sudo yunohost firewall disallow $ccnet_port
|
|
sudo yunohost firewall disallow $seafile_port
|
|
|
|
sudo yunohost service remove seafile-server
|
|
|
|
# remove sso config to unprotect domain.tld/seafhttp in /etc/ssowat/conf.json.persistent
|
|
sudo python ../conf/remove_sso_config.py
|
|
|
|
# Restart services
|
|
sudo service nginx reload
|
|
sudo yunohost app ssowatconf |