mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
83 lines
No EOL
2.1 KiB
Bash
83 lines
No EOL
2.1 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
# Source YunoHost helpers
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# Load common variables and helpers
|
|
source ./_common.sh
|
|
|
|
#=================================================
|
|
# LOAD SETTINGS
|
|
#=================================================
|
|
|
|
# See comments in install script
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
port=$(ynh_app_setting_get "$app" web_port)
|
|
portUnicorn=$(ynh_app_setting_get "$app" unicorn_port)
|
|
|
|
#=================================================
|
|
# STANDARD REMOVE
|
|
#=================================================
|
|
# REMOVE GITLAB
|
|
#=================================================
|
|
|
|
# Remove gitlab
|
|
dpkg --remove gitlab-ce
|
|
|
|
#=================================================
|
|
# REMOVE CONF GILE
|
|
#=================================================
|
|
|
|
# Remove Config
|
|
remove_config_gitlab
|
|
|
|
#=================================================
|
|
# REMOVE DEPENDENCIES
|
|
#=================================================
|
|
|
|
ynh_remove_app_dependencies
|
|
|
|
#=================================================
|
|
# REMOVE APP MAIN DIR
|
|
#=================================================
|
|
|
|
ynh_secure_remove "$final_path"
|
|
ynh_secure_remove "$config_path"
|
|
ynh_secure_remove "/var/opt/$app"
|
|
|
|
# Remove the log files
|
|
ynh_secure_remove "/var/log/$app"
|
|
|
|
#=================================================
|
|
# CLOSE PORTS
|
|
#=================================================
|
|
|
|
if yunohost firewall list | grep -q "\- $port$"
|
|
then
|
|
echo "Close port $port" >&2
|
|
yunohost firewall disallow TCP $port 2>&1
|
|
fi
|
|
|
|
if yunohost firewall list | grep -q "\- $portUnicorn$"
|
|
then
|
|
echo "Close port $portUnicorn" >&2
|
|
yunohost firewall disallow TCP $portUnicorn 2>&1
|
|
fi
|
|
|
|
#=================================================
|
|
# REMOVE NGINX CONFIGURATION
|
|
#=================================================
|
|
|
|
ynh_remove_nginx_config
|
|
|
|
#=================================================
|
|
# REMOVE LOGROTATE CONFIGURATION
|
|
#=================================================
|
|
|
|
#ynh_remove_logrotate |