1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/coturn_ynh.git synced 2024-09-03 18:16:32 +02:00

Update remove

This commit is contained in:
Éric Gaspar 2023-12-26 18:08:42 +01:00
parent 8566a75414
commit 502de527fe

View file

@ -14,57 +14,29 @@ source /usr/share/yunohost/helpers
#=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST
#=================================================
ynh_script_progression --message="Removing $app service integration..." --weight=1
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null
then
ynh_script_progression --message="Removing $app service integration..." --weight=1
yunohost service remove $app
fi
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
# Remove the dedicated systemd config
ynh_remove_systemd_config
#=================================================
# REMOVE APP MAIN DIR
#=================================================
ynh_script_progression --message="Removing Coturn configuration file..." --weight=2
ynh_secure_remove --file="/etc/turnserver.conf"
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Removing logrotate configuration..." --weight=1
# Remove the app-specific logrotate config
ynh_remove_logrotate
#=================================================
# REMOVE SCRIPT
#=================================================
# Remove coturn/Coturn_config_rotate.sh
ynh_secure_remove --file="/home/yunohost.app/$app"
#=================================================
# REMOVE CRON JOB
#=================================================
# Remove a cron file
ynh_secure_remove --file=/etc/cron.d/$app
# Remove the log files
ynh_secure_remove --file=/var/log/$app
# Remove the sqlitedb file
#ynh_secure_remove --file=/var/lib/turn
#=================================================
# GENERIC FINALIZATION
#=================================================