#!/bin/bash # PirateBox app for YunoHost # Copyright (C) 2015 Julien Vaubourg # Contribute at https://github.com/labriqueinternet/piratebox_ynh # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . source ./helpers # Retrieve arguments domain=$(sudo yunohost app setting piratebox domain) # The End ynh_systemctl stop ynh-piratebox sudo systemctl disable ynh-piratebox sudo yunohost service remove ynh-piratebox sudo rm -f /etc/systemd/system/ynh-piratebox.service /usr/local/bin/ynh-piratebox sudo rm -f /tmp/.ynh-piratebox-* # Update firewall sudo yunohost firewall disallow UDP 4253 sudo yunohost firewall disallow TCP 4280 # Remove confs sudo rm -f /etc/nginx/captive-piratebox.conf sudo rm -f "/etc/nginx/conf.d/${domain}.d/piratebox.conf" sudo rm -f /etc/php5/fpm/pool.d/{captive-,}piratebox.conf # Delete fakedns sudo rm -f /usr/local/bin/piratebox_fakedns # Restart services sudo systemctl restart php5-fpm sudo systemctl reload nginx # Remove tmp folder sudo rm -rf /var/spool/piratebox/ # Remove sources sudo rm -rf /var/www/piratebox/ sudo rm -rf /var/www/piratebox_admin/ exit 0