mirror of
https://github.com/YunoHost-Apps/fittrackee_ynh.git
synced 2024-09-03 18:36:16 +02:00
53 lines
No EOL
1.6 KiB
Bash
53 lines
No EOL
1.6 KiB
Bash
#!/bin/bash
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# LOAD SETTINGS
|
|
#=================================================
|
|
ynh_script_progression "Loading installation settings..."
|
|
|
|
redis_db=$(ynh_app_setting_get --key=redis_db)
|
|
|
|
#=================================================
|
|
# STANDARD REMOVE
|
|
#=================================================
|
|
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
|
#=================================================
|
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
|
if ynh_hide_warnings yunohost service status $app >/dev/null
|
|
then
|
|
ynh_script_progression "Removing $app services integration..."
|
|
yunohost service remove $app
|
|
yunohost service remove ${app}_workers
|
|
fi
|
|
|
|
#=================================================
|
|
# STOP AND REMOVE SERVICE
|
|
#=================================================
|
|
ynh_script_progression "Stopping and removing the systemd service..."
|
|
|
|
# Remove the dedicated systemd config
|
|
ynh_config_remove_systemd"${app}"
|
|
ynh_config_remove_systemd"${app}_workers"
|
|
|
|
#=================================================
|
|
# REMOVE VARIOUS FILES
|
|
#=================================================
|
|
ynh_script_progression "Removing various files..."
|
|
|
|
# Remove the dedicated NGINX config
|
|
ynh_config_remove_nginx
|
|
|
|
ynh_config_remove_logrotate
|
|
|
|
# Remove the redis database
|
|
ynh_redis_remove_db "$redis_db"
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression "Removal of $app completed" |