mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
50 lines
No EOL
1.2 KiB
Bash
50 lines
No EOL
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
# Source YunoHost helpers
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# Stop script if errors
|
|
set -u
|
|
|
|
# Import common cmd
|
|
source ./_common.sh
|
|
|
|
# Init get Final path
|
|
get_configuration
|
|
|
|
# Retrieve arguments
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
systemctl stop seafile-server.service
|
|
|
|
# remove sso config to unprotect domain.tld/seafhttp in /etc/ssowat/conf.json.persistent
|
|
test -e /var/www/$app/remove_sso_conf.py && python /var/www/$app/remove_sso_conf.py
|
|
test -e /opt/yunohost/$app/remove_sso_conf.py && python /opt/yunohost/$app/remove_sso_conf.py
|
|
ynh_secure_remove /var/log/seafile
|
|
ynh_secure_remove /var/www/$app
|
|
ynh_secure_remove /opt/yunohost/$app
|
|
ynh_secure_remove /etc/init.d/seafile-server
|
|
ynh_secure_remove /home/yunohost.app/seafile-data
|
|
ynh_secure_remove /tmp/seahub_cache
|
|
|
|
# Remove databases
|
|
ynh_mysql_drop_db ccnetdb
|
|
ynh_mysql_drop_db seafiledb
|
|
ynh_mysql_drop_db seahubdb
|
|
|
|
# Remove user
|
|
ynh_system_user_delete seafile
|
|
|
|
# Remove depandance
|
|
ynh_remove_app_dependencies
|
|
|
|
# Remove domain config
|
|
ynh_secure_remove /etc/nginx/conf.d/$domain.d/seafile.conf
|
|
|
|
# Remove logrotate
|
|
ynh_remove_logrotate
|
|
|
|
yunohost service remove seafile-server
|
|
|
|
# Reload nginx
|
|
systemctl reload nginx.service |