mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
83 lines
2.3 KiB
Bash
Executable file
83 lines
2.3 KiB
Bash
Executable file
#!/bin/bash
|
|
#=================================================
|
|
# GENERIC STARTING
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
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 MONGODB
|
|
#=================================================
|
|
# TODO / FIXME : remove the keys added ?
|
|
#apt-key del EA312927
|
|
#apt-key del 0C49F3730359A14518585931BC711F9BA15703C6
|
|
|
|
#rm -f /etc/apt/sources.list.d/mongodb-org-3.2.list
|
|
|
|
#=================================================
|
|
# 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
|
|
|
|
|