1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/transmission_ynh.git synced 2024-09-04 01:46:12 +02:00
transmission_ynh/scripts/remove

47 lines
1.4 KiB
Text
Raw Normal View History

2013-10-29 14:26:46 +01:00
#!/bin/bash
2017-06-13 23:37:51 +02:00
#=================================================
2022-07-03 20:36:04 +02:00
# GENERIC START
2017-06-13 23:37:51 +02:00
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD REMOVE
#=================================================
2022-07-03 20:36:04 +02:00
# REMOVE SERVICE INTEGRATION IN YUNOHOST
2017-06-13 23:37:51 +02:00
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
2017-06-13 23:37:51 +02:00
2022-07-03 20:36:04 +02:00
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
2019-05-01 13:24:56 +02:00
if yunohost service status transmission-daemon >/dev/null 2>&1
2017-06-13 23:37:51 +02:00
then
2022-07-03 20:36:04 +02:00
ynh_script_progression --message="Removing $app service integration..." --weight=8
2017-08-27 22:01:10 +02:00
yunohost service remove transmission-daemon
2017-06-13 23:37:51 +02:00
fi
2022-07-03 20:36:04 +02:00
# Remove the dedicated NGINX config
ynh_remove_nginx_config
# Web interface
2019-05-01 13:24:56 +02:00
ynh_secure_remove --file=/usr/share/transmission
# And data
2019-05-01 13:24:56 +02:00
ynh_secure_remove --file=/var/lib/transmission-daemon
2019-05-09 11:07:57 +02:00
# Kernel parameters
if [ -e /proc/sys/net/core/rmem_max ]
2020-03-03 19:06:26 +01:00
then
2022-07-03 20:36:04 +02:00
ynh_secure_remove --file=/etc/sysctl.d/90-transmission.conf
sysctl --load=/etc/sysctl.d/90-transmission.conf
fi
2017-06-15 00:33:49 +02:00
2019-05-01 13:24:56 +02:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of $app completed" --last