1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/webtrees_ynh.git synced 2024-09-03 18:26:37 +02:00
webtrees_ynh/scripts/remove

51 lines
1.4 KiB
Text
Raw Normal View History

2017-07-01 19:54:37 +02:00
#!/bin/bash
2017-08-01 11:29:01 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2017-08-01 11:29:01 +02:00
source _common.sh
2017-07-01 19:54:37 +02:00
source /usr/share/yunohost/helpers
2017-08-01 11:29:01 +02:00
#=================================================
# LOAD SETTINGS
#=================================================
2018-09-01 18:12:10 +02:00
2017-08-01 11:29:01 +02:00
app=$YNH_APP_INSTANCE_NAME
2017-07-01 19:54:37 +02:00
# Retrieve app settings
domain=$(ynh_app_setting_get "$app" domain)
2017-08-01 11:29:01 +02:00
db_name=$(ynh_app_setting_get $app db_name)
2018-09-01 18:12:10 +02:00
db_user=$db_name
final_path=$(ynh_app_setting_get $app final_path)
2017-08-01 11:29:01 +02:00
2018-09-01 18:12:10 +02:00
#=================================================
# REMOVE APP MAIN DIR
#=================================================
2017-08-01 11:29:01 +02:00
# Remove the app directory securely
2018-09-01 18:12:10 +02:00
ynh_secure_remove "$final_path"
2017-08-01 11:29:01 +02:00
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
2017-07-01 19:54:37 +02:00
2017-08-01 11:29:01 +02:00
# Remove the dedicated nginx config
ynh_remove_nginx_config
2017-07-01 19:54:37 +02:00
2018-09-01 18:12:10 +02:00
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
# Remove the dedicated php-fpm config
ynh_remove_fpm_config
2017-07-01 19:54:37 +02:00
2018-09-01 18:12:10 +02:00
#=================================================
# REMOVE THE MYSQL DATABASE
#=================================================
2017-07-01 19:54:37 +02:00
2017-08-01 11:29:01 +02:00
# Remove a database if it exists, along with the associated user
2018-09-01 18:12:10 +02:00
ynh_mysql_remove_db $db_user $db_name