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

27 lines
606 B
Text
Raw Normal View History

2017-07-15 11:39:52 +02:00
#!/bin/bash
2017-07-19 22:40:20 +02:00
2017-07-18 22:58:27 +02:00
domain=$(sudo yunohost app setting flood domain)
data_dir=$(sudo yunohost app setting flood data_dir)
2017-07-15 11:39:52 +02:00
2017-07-18 22:58:27 +02:00
sudo service rtorrent stop
sudo service flood stop
2017-07-15 11:39:52 +02:00
2017-07-18 22:58:27 +02:00
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
2017-07-15 11:39:52 +02:00
2017-07-18 22:58:27 +02:00
# Remove the user
sudo userdel -f flood
2017-07-19 22:40:20 +02:00
sudo rm -rf /var/www/flood
2017-07-15 11:39:52 +02:00
2017-07-18 22:58:27 +02:00
# Remove the service
sudo yunohost service remove flood
sudo yunohost service remove rtorrent
2017-07-15 11:39:52 +02:00
2017-07-18 22:58:27 +02:00
# Remove rtorrent
sudo rm -f /usr/local/bin/rtorrent
2017-07-15 11:39:52 +02:00
2017-07-18 22:58:27 +02:00
sudo yunohost app ssowatconf
sudo service nginx reload