mirror of
https://github.com/YunoHost-Apps/minetest_ynh.git
synced 2024-09-03 20:36:00 +02:00
51 lines
1.5 KiB
Bash
Executable file
51 lines
1.5 KiB
Bash
Executable file
#!/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 sudo yunohost service status | grep -q minetest # Test l'existence du service dans Yunohost
|
|
then
|
|
echo "Remove minetest service"
|
|
sudo yunohost service remove minetest
|
|
fi
|
|
|
|
#=================================================
|
|
# CLOSE THE PORTS
|
|
#=================================================
|
|
|
|
# Ferme les ports dans le firewall
|
|
ALL_QUIET sudo yunohost firewall disallow UDP $port
|
|
|
|
#=================================================
|
|
# SPECIFIC REMOVE
|
|
#=================================================
|
|
# REMOVE MINETEST
|
|
#=================================================
|
|
|
|
# Suppression du paquet minetest
|
|
if [ -e "/usr/lib/minetest/minetestserver" ]; then
|
|
echo "Remove minetest package"
|
|
sudo apt-get -y purge minetest-server minetest-data
|
|
fi
|
|
ynh_secure_remove "/etc/apt/sources.list.d/minetest.list"
|