2014-07-20 14:09:41 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-10-21 22:52:21 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
2017-10-19 12:13:47 +02:00
|
|
|
|
2017-10-21 22:52:21 +02:00
|
|
|
source _common.sh
|
2017-10-19 12:13:47 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2017-10-21 22:52:21 +02:00
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
|
|
|
|
2017-10-19 12:31:32 +02:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
2014-07-20 14:09:41 +02:00
|
|
|
|
2017-10-21 22:52:21 +02:00
|
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
|
|
final_path=$(ynh_app_setting_get "$app" final_path)
|
|
|
|
|
2016-07-23 14:54:26 +02:00
|
|
|
dbname=$app
|
|
|
|
dbuser=$app
|
2014-07-20 14:09:41 +02:00
|
|
|
|
2017-10-23 16:17:55 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE DEPENDENCIES
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# Remove metapackage and its dependencies
|
|
|
|
ynh_remove_app_dependencies
|
|
|
|
|
2017-10-21 22:52:21 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE THE MYSQL DATABASE
|
|
|
|
#=================================================
|
2014-07-20 18:10:20 +02:00
|
|
|
|
2017-10-21 22:52:21 +02:00
|
|
|
# Remove a database if it exists, along with the associated user
|
|
|
|
ynh_mysql_remove_db "$dbuser" "$dbname"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE APP MAIN DIR
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_secure_remove "$final_path"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE NGINX CONFIGURATION
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# Remove the dedicated nginx config
|
|
|
|
ynh_remove_nginx_config
|
2016-07-23 14:54:26 +02:00
|
|
|
|
2017-10-21 22:52:21 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
2014-12-22 18:56:59 +01:00
|
|
|
|
2017-10-21 22:52:21 +02:00
|
|
|
ynh_remove_fpm_config
|