1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/minetest_ynh.git synced 2024-09-03 20:36:00 +02:00
minetest_ynh/scripts/remove

55 lines
1.6 KiB
Text
Raw Normal View History

2017-06-09 14:03:32 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
app=$YNH_APP_INSTANCE_NAME
port=$(ynh_app_setting_get $app port)
#=================================================
# STANDARD REMOVE
#=================================================
# DISABLE SERVICE IN ADMIN PANEL
#=================================================
# Retire le service du monitoring de Yunohost.
if yunohost service status | grep -q minetest # Test l'existence du service dans Yunohost
2017-06-09 14:03:32 +02:00
then
echo "Remove minetest service"
yunohost service remove minetest
2017-06-09 14:03:32 +02:00
fi
#=================================================
# CLOSE THE PORTS
#=================================================
# Ferme les ports dans le firewall
ALL_QUIET yunohost firewall disallow UDP $port
ALL_QUIET yunohost firewall disallow TCP $port
2017-06-09 14:03:32 +02:00
#=================================================
# SPECIFIC REMOVE
#=================================================
# REMOVE MINETEST
#=================================================
# Suppression du paquet minetest
if [ -e "/usr/lib/minetest/minetestserver" ]; then
echo "Remove minetest package"
ynh_remove_app_dependencies
2017-06-09 14:03:32 +02:00
fi
ynh_secure_remove "/etc/apt/sources.list.d/$app.list"
ynh_secure_remove "/etc/apt/preferences.d/00MinetestPinning"
ynh_package_update