mirror of
https://github.com/YunoHost-Apps/mailman3_ynh.git
synced 2024-09-03 19:36:17 +02:00
97 lines
2.8 KiB
Text
97 lines
2.8 KiB
Text
|
#!/bin/bash
|
||
|
|
||
|
#=================================================
|
||
|
# GENERIC START
|
||
|
#=================================================
|
||
|
# IMPORT GENERIC HELPERS
|
||
|
#=================================================
|
||
|
|
||
|
source _common.sh
|
||
|
source /usr/share/yunohost/helpers
|
||
|
source ynh_add_extra_apt_repos__3
|
||
|
|
||
|
#=================================================
|
||
|
# LOAD SETTINGS
|
||
|
#=================================================
|
||
|
|
||
|
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||
|
|
||
|
app=$YNH_APP_INSTANCE_NAME
|
||
|
app_web="${app}_web"
|
||
|
|
||
|
#=================================================
|
||
|
# STANDARD REMOVE
|
||
|
#=================================================
|
||
|
|
||
|
#=================================================
|
||
|
# REMOVE BACKPORTS REPOSITORY
|
||
|
#=================================================
|
||
|
|
||
|
ynh_script_progression --message="Removing stretch backports ..." --weight=2
|
||
|
|
||
|
ynh_remove_extra_repo --name=stretch-backports
|
||
|
|
||
|
#=================================================
|
||
|
# REMOVE THE POSTGRESQL DATABASE
|
||
|
#=================================================
|
||
|
|
||
|
ynh_script_progression --message="Removing the PostgreSQL databases..." --weight=4
|
||
|
|
||
|
ynh_psql_remove_db --db_user=$app --db_name=$app
|
||
|
|
||
|
ynh_psql_remove_db --db_user="$app_web" --db_name="$app_web"
|
||
|
|
||
|
#=================================================
|
||
|
# REMOVE DEPENDENCIES
|
||
|
#=================================================
|
||
|
|
||
|
ynh_script_progression --message="Removing dependencies..." --weight=6
|
||
|
|
||
|
ynh_remove_app_dependencies
|
||
|
|
||
|
ynh_package_autopurge $mailman3_suite_pkg
|
||
|
|
||
|
ynh_secure_remove /usr/share/mailman3-web
|
||
|
|
||
|
ynh_secure_remove /etc/mailman3
|
||
|
|
||
|
#=================================================
|
||
|
# REMOVE NGINX CONFIGURATION
|
||
|
#=================================================
|
||
|
|
||
|
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2
|
||
|
|
||
|
ynh_remove_nginx_config
|
||
|
|
||
|
#=================================================
|
||
|
# REMOVE SERVICE FROM ADMIN PANEL
|
||
|
#=================================================
|
||
|
|
||
|
ynh_script_progression --message="Removing registered services..." --weight=3
|
||
|
|
||
|
if yunohost service status $app >/dev/null 2>&1
|
||
|
then
|
||
|
ynh_script_progression --message="Removing $app service..." --weight=2
|
||
|
yunohost service remove "$app"
|
||
|
fi
|
||
|
|
||
|
if yunohost service status "$app-web" >/dev/null 2>&1
|
||
|
then
|
||
|
ynh_script_progression --message="Removing $app-web service..." --weight=2
|
||
|
yunohost service remove "$app-web"
|
||
|
fi
|
||
|
|
||
|
#=================================================
|
||
|
# SPECIFIC REMOVE
|
||
|
#=================================================
|
||
|
|
||
|
#=================================================
|
||
|
# GENERIC FINALIZATION
|
||
|
#=================================================
|
||
|
|
||
|
#=================================================
|
||
|
# END OF SCRIPT
|
||
|
#=================================================
|
||
|
|
||
|
ynh_script_progression --message="Removal of $app completed" --last
|