1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pgadmin_ynh.git synced 2024-09-03 19:56:38 +02:00
pgadmin_ynh/scripts/remove
2017-11-14 16:05:26 +01:00

33 lines
646 B
Bash

#!/bin/bash
# Source YunoHost helpers
source /usr/share/yunohost/helpers
# Stop script if errors
set -u
# Import common cmd
source ./_common.sh
# LOAD SETTINGS
domain=$(ynh_app_setting_get $app domain)
db_name=$(ynh_app_setting_get $app db_name)
final_path=$(ynh_app_setting_get $app final_path)
# Remove db user
ynh_psql_drop_user $db_user
# Remove depandance
ynh_remove_app_dependencies || true
# Remove the app directory securely
ynh_secure_remove "$final_path"
# 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