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

76 lines
2.6 KiB
Text
Raw Normal View History

2020-05-08 20:42:27 +02:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
2023-05-07 18:10:21 +02:00
#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1
2020-05-08 20:42:27 +02:00
2023-05-07 18:10:21 +02:00
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
2020-05-08 20:42:27 +02:00
2023-05-07 18:10:21 +02:00
#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
2020-05-08 20:42:27 +02:00
#=================================================
# REMOVE DEPENDENCIES
#=================================================
2023-05-07 18:10:21 +02:00
#REMOVEME? ynh_script_progression --message="Removing dependencies..." --weight=7
2020-05-08 20:42:27 +02:00
# Remove metapackage and its dependencies
2021-04-25 16:50:33 +02:00
ynh_use_nodejs
ynh_npm uninstall -g coffeescript
ynh_remove_nodejs
2023-05-07 18:10:21 +02:00
#REMOVEME? ynh_remove_app_dependencies
2020-05-08 20:42:27 +02:00
2021-05-09 11:52:48 +02:00
#=================================================
# REMOVE CRONJOB
#=================================================
2021-05-09 14:04:51 +02:00
ynh_secure_remove --file="/etc/cron.d/$app"
2021-02-20 19:31:31 +01:00
2020-05-08 20:42:27 +02:00
#=================================================
# REMOVE MULTIMEDIA SYMBOLIC LINK
2020-05-08 20:42:27 +02:00
#=================================================
ynh_script_progression --message="Removing Game folder..." --weight=1
2020-05-08 20:42:27 +02:00
# Remove the app directory securely
ynh_secure_remove --file="/home/yunohost.multimedia/share/Game"
2020-05-08 20:42:27 +02:00
2021-05-29 16:58:49 +02:00
#=================================================
# REMOVE APP MAIN DIR
2021-05-29 16:58:49 +02:00
#=================================================
2023-05-07 18:10:21 +02:00
#REMOVEME? ynh_script_progression --message="Removing app main directory..." --weight=1
2021-05-29 16:58:49 +02:00
# Remove the app directory securely
2023-05-07 18:10:21 +02:00
#REMOVEME? ynh_secure_remove --file="$install_dir"
2021-05-29 16:58:49 +02:00
2020-05-08 20:42:27 +02:00
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
2021-09-08 10:11:26 +02:00
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
2020-05-08 20:42:27 +02:00
# Remove the dedicated nginx config
ynh_remove_nginx_config
2023-05-07 18:10:21 +02:00
#REMOVEME? if [ "$(ynh_app_setting_get --app=$app --key=checksum__etc_nginx_mime.types)" == "$(md5sum "/etc/nginx/mime.types" | cut -d ' ' -f 1)" ]; then
2021-02-20 19:31:31 +01:00
#file has not changed, restore the previous mime.type
rm /etc/nginx/mime.types
mv /etc/nginx/mime.types.$app /etc/nginx/mime.types
else
#keep the actual mime.type and warn
ynh_print_warn "/etc/nginx/mime.types has changed! Keeping current file!"
fi
2020-05-08 20:42:27 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2021-09-08 10:11:26 +02:00
ynh_script_progression --message="Removal of $app completed" --last