1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/horde_ynh.git synced 2024-09-03 19:16:08 +02:00
horde_ynh/scripts/remove

49 lines
1.2 KiB
Text
Raw Normal View History

2018-02-06 14:33:23 +01:00
#!/bin/bash
2018-02-11 00:32:26 +01:00
#=================================================
# GENERIC START
#=================================================
2018-02-06 14:33:23 +01:00
# Source YunoHost helpers
source /usr/share/yunohost/helpers
# Import common cmd
source ./experimental_helper.sh
source ./_common.sh
# Retrieve app settings
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
port=$(ynh_app_setting_get $app port)
db_name=$(ynh_app_setting_get $app db_name)
db_user=$(ynh_app_setting_get $app db_user)
final_path=$(ynh_app_setting_get $app final_path)
2018-02-11 00:32:26 +01:00
#=================================================
# STANDARD REMOVE
#=================================================
2018-02-06 14:33:23 +01:00
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
# Remove a database if it exists, along with the associated user
ynh_mysql_remove_db $db_user $db_name
# Remove the app directory securely
ynh_secure_remove "$final_path"
# Remove user data
ynh_secure_remove "$gollem_data_dir"
# Remove the dedicated nginx config
ynh_remove_nginx_config
# Remove the dedicated php-fpm config
ynh_remove_fpm_config
# Delete a system user
ynh_system_user_delete $app
# Remove the app-specific logrotate config
ynh_remove_logrotate