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

82 lines
2.5 KiB
Text
Raw Normal View History

2016-06-02 16:10:37 +02:00
#!/bin/bash
2018-08-05 02:02:55 +02:00
#=================================================
2022-03-31 19:39:38 +02:00
# GENERIC START
2018-08-05 02:02:55 +02:00
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2016-06-02 16:10:37 +02:00
2022-03-31 19:39:38 +02:00
source _common.sh
2018-08-05 02:02:55 +02:00
source /usr/share/yunohost/helpers
2016-06-02 16:10:37 +02:00
2018-08-05 02:02:55 +02:00
#=================================================
# LOAD SETTINGS
#=================================================
2022-04-04 20:12:41 +02:00
ynh_script_progression --message="Loading installation settings..." --weight=1
2018-08-05 02:02:55 +02:00
2019-06-24 18:49:09 +02:00
app=$YNH_APP_INSTANCE_NAME
2020-07-08 09:49:14 +02:00
domain=$(ynh_app_setting_get --app=$app --key=domain)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
2018-08-05 02:02:55 +02:00
#=================================================
2022-03-31 19:39:38 +02:00
# STANDARD REMOVE
#=================================================
# ...
2018-08-05 02:02:55 +02:00
#=================================================
2016-06-02 16:10:37 +02:00
2022-03-31 19:39:38 +02:00
#=================================================
# REMOVE APP MAIN DIR
#=================================================
2022-04-04 20:21:11 +02:00
ynh_script_progression --message="Removing app main directory..." --weight=3
2022-03-31 19:39:38 +02:00
# Remove the app directory securely
2022-05-04 01:21:56 +02:00
ynh_secure_remove --file="$final_path/_h5ai"
2016-06-02 16:10:37 +02:00
2020-12-02 12:13:13 +01:00
#=================================================
2022-03-31 19:39:38 +02:00
# REMOVE NGINX CONFIGURATION
2020-12-02 12:13:13 +01:00
#=================================================
2022-04-04 20:12:41 +02:00
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
2020-12-02 12:13:13 +01:00
2022-03-31 19:39:38 +02:00
# Remove the dedicated NGINX config
2021-05-26 12:16:06 +02:00
ynh_remove_nginx_config
2020-12-02 12:13:13 +01:00
2022-03-31 19:39:38 +02:00
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
2022-04-04 20:12:41 +02:00
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
2022-03-31 19:39:38 +02:00
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
#=================================================
# REMOVE DEPENDENCIES
#=================================================
2022-04-04 20:12:41 +02:00
ynh_script_progression --message="Removing dependencies..." --weight=1
2022-03-31 19:39:38 +02:00
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# SPECIFIC REMOVE
#=================================================
2022-04-04 20:22:57 +02:00
# ...
2022-03-31 19:39:38 +02:00
#=================================================
#=================================================
# GENERIC FINALIZATION
2018-08-05 02:02:55 +02:00
#=================================================
2021-05-26 12:16:06 +02:00
# REMOVE DEDICATED USER
2018-08-05 02:02:55 +02:00
#=================================================
2022-04-04 20:12:41 +02:00
ynh_script_progression --message="Removing the dedicated system user..." --weight=1
2016-06-02 16:10:37 +02:00
2021-05-26 12:16:06 +02:00
# Delete a system user
ynh_system_user_delete --username=$app
2020-07-08 09:49:14 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2022-04-04 20:12:41 +02:00
ynh_script_progression --message="Removal of $app completed" --last