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

65 lines
2.1 KiB
Text
Raw Normal View History

2019-02-20 12:08:50 +01:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
2019-04-10 11:19:13 +02:00
ynh_print_info "Loading installation settings..."
2019-02-20 12:08:50 +01:00
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
port=$(ynh_app_setting_get $app port)
final_path=$(ynh_app_setting_get $app final_path)
#=================================================
# STANDARD REMOVE
#=================================================
2020-11-16 19:38:35 +01:00
# REMOVE SERVICE INTEGRATION IN YUNOHOST
2019-04-10 11:19:13 +02:00
#=================================================
2020-11-16 19:38:35 +01:00
# Remove the service from the list of services known by Yunohost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null
2019-04-10 11:19:13 +02:00
then
2020-11-16 19:38:35 +01:00
ynh_script_progression --message="Removing $app service..." --weight=1
2021-12-06 23:12:58 +01:00
yunohost service remove cockpit.socket
2019-04-10 11:19:13 +02:00
fi
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
2020-11-16 19:38:35 +01:00
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
2019-02-20 12:08:50 +01:00
2019-04-10 11:19:13 +02:00
# Remove the dedicated systemd config
ynh_remove_systemd_config
2019-02-20 12:08:50 +01:00
#=================================================
# REMOVE DEPENDENCIES
#=================================================
2020-11-16 19:38:35 +01:00
ynh_script_progression --message="Removing dependencies..." --weight=1
2019-02-20 12:08:50 +01:00
# Remove metapackage and its dependencies
2019-04-10 11:19:13 +02:00
ynh_remove_app_dependencies
2019-02-20 12:08:50 +01:00
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
2020-11-16 19:38:35 +01:00
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=5
2019-02-20 12:08:50 +01:00
2020-11-16 19:38:35 +01:00
# Remove the dedicated NGINX config
2019-02-20 12:08:50 +01:00
ynh_remove_nginx_config
2019-04-10 11:19:13 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2021-07-07 19:08:59 +02:00
ynh_script_progression --message="Removal of $app completed" --last