2023-01-11 18:59:44 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
2024-01-05 16:20:44 +01:00
|
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
2023-01-11 18:59:44 +01:00
|
|
|
#=================================================
|
2024-01-05 16:20:44 +01:00
|
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
2023-01-11 18:59:44 +01:00
|
|
|
|
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
2024-01-05 16:20:44 +01:00
|
|
|
if ynh_exec_warn_less yunohost service status $app >/dev/null; then
|
|
|
|
yunohost service remove $app
|
2023-01-11 18:59:44 +01:00
|
|
|
fi
|
|
|
|
|
2024-01-05 16:20:44 +01:00
|
|
|
# Remove the dedicated NGINX config
|
|
|
|
ynh_remove_nginx_config
|
2023-01-11 18:59:44 +01:00
|
|
|
|
|
|
|
# Remove the dedicated systemd config
|
|
|
|
ynh_remove_systemd_config
|
|
|
|
|
|
|
|
# Remove the app-specific logrotate config
|
|
|
|
ynh_remove_logrotate
|
|
|
|
|
|
|
|
# Remove the log files
|
|
|
|
ynh_secure_remove --file="/var/log/$app"
|
|
|
|
|
2024-01-05 16:20:44 +01:00
|
|
|
_remove_restart_script_and_sudoers
|
2023-01-14 10:17:35 +01:00
|
|
|
|
2023-01-11 18:59:44 +01:00
|
|
|
#=================================================
|
2024-01-05 16:20:44 +01:00
|
|
|
# REMOVE DEPENDENCIES
|
2023-01-11 18:59:44 +01:00
|
|
|
#=================================================
|
2024-01-05 16:20:44 +01:00
|
|
|
ynh_script_progression --message="Removing NodeJS..." --weight=2
|
2023-01-11 18:59:44 +01:00
|
|
|
|
2024-01-05 16:20:44 +01:00
|
|
|
# Remove metapackage and its dependencies
|
|
|
|
ynh_remove_nodejs --nodejs_version=$nodejs_version
|
2023-01-11 18:59:44 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|