mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
75 lines
2 KiB
Bash
Executable file
75 lines
2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source _future.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# LOAD SETTINGS
|
|
#=================================================
|
|
readonly app=$YNH_APP_INSTANCE_NAME
|
|
readonly domain=$(ynh_app_setting_get "$app" domain)
|
|
readonly final_path=$(ynh_app_setting_get "$app" final_path)
|
|
|
|
#=================================================
|
|
# STANDARD REMOVE
|
|
#=================================================
|
|
# STOP AND REMOVE SERVICE
|
|
#=================================================
|
|
|
|
ynh_remove_systemd_config
|
|
|
|
#=================================================
|
|
# DISABLE SERVICE IN ADMIN PANEL
|
|
#=================================================
|
|
|
|
if yunohost service status | grep -q $app # Test l'existence du service dans Yunohost
|
|
then
|
|
echo "Remove $app service"
|
|
yunohost service remove $app
|
|
fi
|
|
|
|
#=================================================
|
|
# REMOVE DB
|
|
#=================================================
|
|
mongo $app --eval "db.dropDatabase()"
|
|
|
|
#=================================================
|
|
# REMOVE DEPENDENCIES
|
|
#=================================================
|
|
|
|
ynh_remove_app_dependencies
|
|
|
|
#=================================================
|
|
# REMOVE NODEJS
|
|
#=================================================
|
|
|
|
ynh_remove_nodejs
|
|
|
|
#=================================================
|
|
# REMOVE THE MAIN DIR OF THE APP
|
|
#=================================================
|
|
|
|
ynh_secure_remove "/var/www/$app"
|
|
|
|
#=================================================
|
|
# REMOVE THE NGINX CONFIGURATION
|
|
#=================================================
|
|
|
|
ynh_remove_nginx_config
|
|
|
|
#=================================================
|
|
# GENERIC FINALISATION
|
|
#=================================================
|
|
# REMOVE DEDICATED USER
|
|
#=================================================
|
|
|
|
ynh_system_user_delete $app
|
|
|
|
|