mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
29 lines
No EOL
832 B
Bash
29 lines
No EOL
832 B
Bash
#!/bin/bash
|
|
domain=$(ynh_app_setting_get seafile domain)
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
|
|
# Import common cmd
|
|
source ./_common.sh
|
|
|
|
# Set configuration for user and final path
|
|
set_configuration
|
|
|
|
sudo service seafile-server stop
|
|
|
|
# remove sso config to unprotect domain.tld/seafhttp in /etc/ssowat/conf.json.persistent
|
|
sudo python $final_path/remove_sso_conf.py
|
|
|
|
sudo rm -rf $final_path
|
|
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
|
|
sudo rm -r /tmp/seahub_cache
|
|
|
|
# Remove databases
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE ccnetdb ; DROP DATABASE seafiledb ; DROP DATABASE seahubdb ; DROP USER seafile@localhost ;"
|
|
|
|
sudo yunohost service remove seafile-server
|
|
|
|
# Restart services
|
|
sudo service nginx reload
|
|
sudo yunohost app ssowatconf |