#!/bin/bash #================================================= # GENERIC START #================================================= # 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) squid=$(ynh_app_setting_get $app squid_folder) # Remove a service from the admin panel, added by `yunohost service add` if yunohost service status | grep -q $app then echo "Remove $squid service" yunohost service remove $app fi #================================================= # REMOVE DEPENDENCIES #================================================= # Remove metapackage and its dependencies apt-get -y purge squid3 yunohost app ssowatconf #================================================= # CLOSE A PORT #================================================= if yunohost firewall list | grep -q "\- $port$" then echo "Close port $port" >&2 yunohost firewall disallow TCP $port 2>&1 fi