2021-01-09 12:31:07 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
|
|
|
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
|
|
|
#=================================================
|
2024-08-30 22:56:31 +02:00
|
|
|
ynh_script_progression "Removing system configurations related to $app..."
|
2021-01-09 12:31:07 +01:00
|
|
|
|
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
2024-08-30 22:56:31 +02:00
|
|
|
if ynh_hide_warnings yunohost service status $app >/dev/null
|
2021-01-09 12:31:07 +01:00
|
|
|
then
|
2024-08-30 22:56:31 +02:00
|
|
|
ynh_script_progression "Removing $app service integration..."
|
2021-01-09 12:31:07 +01:00
|
|
|
yunohost service remove $app
|
|
|
|
fi
|
2022-10-14 09:13:16 +02:00
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
2024-08-30 22:56:31 +02:00
|
|
|
if ynh_hide_warnings yunohost service status ${app}_ldap >/dev/null
|
2022-10-14 09:13:16 +02:00
|
|
|
then
|
2024-08-30 22:56:31 +02:00
|
|
|
ynh_script_progression "Removing ${app}_ldap service integration..."
|
2022-10-14 09:13:16 +02:00
|
|
|
yunohost service remove ${app}_ldap
|
|
|
|
fi
|
2021-01-09 12:31:07 +01:00
|
|
|
|
|
|
|
# Remove the dedicated systemd config
|
2024-08-30 22:56:31 +02:00
|
|
|
ynh_config_remove_systemd
|
|
|
|
ynh_config_remove_systemd${app}_ldap
|
2021-12-01 16:29:14 +01:00
|
|
|
|
2021-01-09 12:31:07 +01:00
|
|
|
# Remove the dedicated NGINX config
|
2024-08-30 22:56:31 +02:00
|
|
|
ynh_config_remove_nginx
|
2021-01-09 12:31:07 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# CLOSE A PORT
|
|
|
|
#=================================================
|
|
|
|
|
2021-09-08 23:27:51 +02:00
|
|
|
if yunohost firewall list | grep -q "\- 49152:65535"
|
2021-01-25 18:06:42 +01:00
|
|
|
then
|
2024-08-30 22:56:31 +02:00
|
|
|
ynh_script_progression "Closing UDP ports..."
|
|
|
|
ynh_hide_warnings yunohost firewall disallow UDP 49152:65535
|
2021-01-25 18:06:42 +01:00
|
|
|
fi
|
2021-01-13 21:58:03 +01:00
|
|
|
|
2021-01-09 12:31:07 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2024-08-30 22:56:31 +02:00
|
|
|
ynh_script_progression "Removal of $app completed"
|