mirror of
https://github.com/YunoHost-Apps/jirafeau_ynh.git
synced 2024-09-03 19:35:53 +02:00
4a5209e0b6
* Upgrade to PHP7.3 * rm -r -> ynh_secure_remove (#74) Co-authored-by: yalh76 <yalh@yahoo.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
78 lines
2.6 KiB
Bash
Executable file
78 lines
2.6 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC STARTING
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# LOAD SETTINGS
|
|
#=================================================
|
|
ynh_script_progression --message="Loading installation settings..." --weight=1
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|
|
|
#=================================================
|
|
# STANDARD REMOVE
|
|
#=================================================
|
|
# REMOVE THE MAIN DIR OF THE APP
|
|
#=================================================
|
|
ynh_script_progression --message="Removing Jirafeau main directory..." --weight=2
|
|
|
|
# Remove the app directory securely
|
|
ynh_secure_remove --file="$final_path"
|
|
|
|
#=================================================
|
|
# REMOVE THE NGINX CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2
|
|
|
|
# Remove the dedicated NGINX config
|
|
ynh_remove_nginx_config
|
|
|
|
#=================================================
|
|
# REMOVE THE PHP-FPM CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
|
|
|
|
# Remove the dedicated PHP-FPM config
|
|
ynh_remove_fpm_config
|
|
|
|
#=================================================
|
|
# REMOVE THE CRON FILE
|
|
#=================================================
|
|
ynh_script_progression --message="Removing the cron file..." --weight=1
|
|
|
|
ynh_secure_remove --file="/etc/cron.d/$app"
|
|
|
|
#=================================================
|
|
# SPECIFIC REMOVE
|
|
#=================================================
|
|
# REMOVE THE DATA DIRECTORY
|
|
#=================================================
|
|
ynh_script_progression --message="Removing data directory..." --weight=1
|
|
|
|
ynh_secure_remove --file="/home/yunohost.app/$app"
|
|
|
|
#=================================================
|
|
# GENERIC FINALISATION
|
|
#=================================================
|
|
# REMOVE DEDICATED USER
|
|
#=================================================
|
|
ynh_script_progression --message="Removing the dedicated system user..." --weight=2
|
|
|
|
# Delete a system user
|
|
ynh_system_user_delete --username=$app
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removal of Jirafeau completed" --last
|