mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
63 lines
1.9 KiB
Bash
63 lines
1.9 KiB
Bash
#!/bin/bash
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# STANDARD REMOVE
|
|
#=================================================
|
|
# REMOVE SERVICE FROM ADMIN PANEL
|
|
#=================================================
|
|
|
|
if yunohost service status "gitlab-runsvdir" >/dev/null 2>&1
|
|
then
|
|
ynh_script_progression "Removing $app service"
|
|
yunohost service remove "gitlab-runsvdir"
|
|
fi
|
|
|
|
#=================================================
|
|
# STOP GITLAB
|
|
#=================================================
|
|
ynh_script_progression "Stopping GitLab"
|
|
|
|
# I use gitlab-ctl and not ynh_systemctl or systemctl to stop the service to avoid this error: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/common_installation_problems/README.md#reconfigure-freezes-at-ruby_blocksupervise_redis_sleep-action-run during the reinstall of the app
|
|
gitlab-ctl stop
|
|
|
|
#=================================================
|
|
# REMOVE GITLAB
|
|
#=================================================
|
|
ynh_script_progression "Removing GitLab"
|
|
|
|
dpkg --remove gitlab-ce
|
|
|
|
#=================================================
|
|
# REMOVE APP MAIN DIR
|
|
#=================================================
|
|
|
|
# Remove the app directory securely
|
|
config_path=/etc/$app
|
|
ynh_safe_rm "$config_path"
|
|
|
|
#=================================================
|
|
# REMOVE NGINX CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression "Removing NGINX web server configuration"
|
|
|
|
# Remove the dedicated NGINX config
|
|
ynh_config_remove_nginx
|
|
|
|
#=================================================
|
|
# SPECIFIC REMOVE
|
|
#=================================================
|
|
# REMOVE GITLAB FILES
|
|
#=================================================
|
|
|
|
ynh_safe_rm "/var/opt/$app"
|
|
|
|
# Remove swap
|
|
ynh_del_swap
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression "Removal of GitLab completed"
|