2017-11-01 20:57:58 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
2019-05-26 17:00:09 +02:00
|
|
|
ynh_script_progression --message="Loading installation settings..." --weight=2
|
2017-11-01 20:57:58 +01:00
|
|
|
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
2019-05-26 17:00:09 +02:00
|
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
2017-11-01 20:57:58 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
2022-07-16 19:44:33 +02:00
|
|
|
# REMOVE LOGROTATE CONFIGURATION
|
2017-11-01 20:57:58 +01:00
|
|
|
#=================================================
|
2022-07-16 19:44:33 +02:00
|
|
|
ynh_script_progression --message="Removing logrotate configuration..."
|
2017-11-01 20:57:58 +01:00
|
|
|
|
2022-07-16 19:44:33 +02:00
|
|
|
# Remove the app-specific logrotate config
|
|
|
|
ynh_remove_logrotate
|
2017-11-01 20:57:58 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE APP MAIN DIR
|
|
|
|
#=================================================
|
2019-05-26 17:00:09 +02:00
|
|
|
ynh_script_progression --message="Removing app main directory..."
|
2017-11-01 20:57:58 +01:00
|
|
|
|
|
|
|
# Remove the app directory securely
|
2019-05-26 17:00:09 +02:00
|
|
|
ynh_secure_remove --file="$final_path"
|
2017-11-01 20:57:58 +01:00
|
|
|
|
|
|
|
#=================================================
|
2022-07-16 19:44:33 +02:00
|
|
|
# REMOVE DEPENDENCIES
|
2017-11-01 20:57:58 +01:00
|
|
|
#=================================================
|
2022-07-16 19:44:33 +02:00
|
|
|
ynh_script_progression --message="Removing dependencies..." --weight=7
|
2017-11-01 20:57:58 +01:00
|
|
|
|
2022-07-16 19:44:33 +02:00
|
|
|
# Remove metapackage and its dependencies
|
|
|
|
ynh_remove_app_dependencies
|
2017-11-01 20:57:58 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# SPECIFIC REMOVE
|
|
|
|
#=================================================
|
2022-07-16 19:44:33 +02:00
|
|
|
# REMOVE VARIOUS FILES
|
2017-11-01 20:57:58 +01:00
|
|
|
#=================================================
|
2022-07-16 19:44:33 +02:00
|
|
|
ynh_script_progression --message="Removing various files..."
|
2017-11-01 20:57:58 +01:00
|
|
|
|
|
|
|
# Remove a cron file
|
2019-05-26 17:00:09 +02:00
|
|
|
ynh_secure_remove --file="/etc/cron.d/$app"
|
2017-11-01 20:57:58 +01:00
|
|
|
|
2019-05-26 17:00:09 +02:00
|
|
|
ynh_script_progression --message="Removing backup directory..." --weight=5
|
2019-01-30 16:07:38 +01:00
|
|
|
|
2017-11-01 20:57:58 +01:00
|
|
|
# Remove the backup directory
|
2019-05-26 17:00:09 +02:00
|
|
|
ynh_secure_remove --file="/home/yunohost.app/$app/backup"
|
2019-01-30 16:07:38 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2019-05-26 17:00:09 +02:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|