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

46 lines
1.4 KiB
Bash

#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD REMOVE
#=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST
#=================================================
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 yunohost service status transmission-daemon >/dev/null 2>&1
then
ynh_script_progression --message="Removing $app service integration..." --weight=8
yunohost service remove transmission-daemon
fi
# Remove the dedicated NGINX config
ynh_remove_nginx_config
# Web interface
ynh_secure_remove --file=/usr/share/transmission
# And data
ynh_secure_remove --file=/var/lib/transmission-daemon
# Kernel parameters
if [ -e /proc/sys/net/core/rmem_max ]
then
ynh_secure_remove --file=/etc/sysctl.d/90-transmission.conf
sysctl --load=/etc/sysctl.d/90-transmission.conf
fi
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of $app completed" --last