mirror of
https://framagit.org/YunoHost-Apps/gitea_ynh.git
synced 2024-11-22 02:51:35 +01:00
49 lines
1.1 KiB
Bash
49 lines
1.1 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# Load common variables and helpers
|
|
source ./experimental_helper.sh
|
|
source ./_common.sh
|
|
|
|
#=================================================
|
|
# STANDARD REMOVE
|
|
#=================================================
|
|
|
|
# Stop gitea
|
|
systemctl stop "$app".service
|
|
|
|
# Drop MySQL database and user
|
|
ynh_mysql_drop_db "$dbname" 2>/dev/null
|
|
ynh_mysql_drop_user "$dbuser" 2>/dev/null
|
|
|
|
# Retrieve domain from app settings
|
|
domain=$(ynh_app_setting_get --app $app --key domain)
|
|
|
|
# Delete app directory and configurations
|
|
ynh_secure_remove --file="$final_path"
|
|
ynh_secure_remove --file="$DATADIR"
|
|
ynh_secure_remove --file="/var/log/$app"
|
|
|
|
# Remove the app-specific logrotate config
|
|
ynh_remove_logrotate
|
|
|
|
# Remove nginx config
|
|
ynh_remove_nginx_config
|
|
|
|
# Remove gitea user and data
|
|
ynh_system_user_delete $app
|
|
|
|
# Remove init script
|
|
ynh_remove_systemd_config
|
|
|
|
# Remove monitor
|
|
yunohost service remove "$app"
|
|
|
|
true # Do not fail if remove after install error
|