1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flood_ynh.git synced 2024-09-03 18:36:20 +02:00
flood_ynh/scripts/remove
2017-11-19 23:01:10 +01:00

30 lines
No EOL
673 B
Bash
Executable file

#!/bin/bash
domain=$(sudo yunohost app setting flood domain)
data_dir=$(sudo yunohost app setting flood data_dir)
sudo service rtorrent stop
sudo service flood stop
sudo rm -rf $data_dir
sudo rm -f /etc/nginx/conf.d/$domain.d/flood.conf
sudo rm -f /etc/systemd/system/flood.service
sudo rm -f /etc/systemd/system/rtorrent.service
# Remove the user
sudo userdel -f flood
sudo rm -rf /var/www/flood
# Close ports
ALL_QUIET sudo yunohost firewall disallow TCP 45069
# Remove the service
sudo yunohost service remove flood
sudo yunohost service remove rtorrent
# Remove rtorrent
sudo rm -f /usr/local/bin/rtorrent
sudo yunohost app ssowatconf
sudo service nginx reload