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.
|
2017-10-20 10:16:34 +02:00
|
|
|
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"
|
2017-10-20 10:16:34 +02:00
|
|
|
yunohost service remove minetest
|
2017-06-09 14:03:32 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# CLOSE THE PORTS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# Ferme les ports dans le firewall
|
2017-10-20 10:16:34 +02:00
|
|
|
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"
|
2017-10-20 10:16:34 +02:00
|
|
|
ynh_remove_app_dependencies
|
2017-06-09 14:03:32 +02:00
|
|
|
fi
|
2017-10-20 10:16:34 +02:00
|
|
|
ynh_secure_remove "/etc/apt/sources.list.d/$app.list"
|
|
|
|
ynh_secure_remove "/etc/apt/preferences.d/00MinetestPinning"
|
|
|
|
ynh_package_update
|