thelinuxlist/scripts/gitearemove.sh

29 lines
646 B
Bash
Raw Normal View History

2022-10-18 22:17:44 -07:00
#!/bin/bash
2022-10-20 10:58:46 -07:00
while true
do
read -r -p "Would you like to uninstall Gitea? This is not reversible. [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
break
;;
[nN][oO]|[nN])
break
;;
*)
2022-10-20 11:02:45 -07:00
echo "That wasn't an option..."
2022-10-20 10:58:46 -07:00
;;
esac
2022-10-18 22:17:44 -07:00
done
sudo systemctl stop gitea
sudo systemctl disable gitea
2022-10-21 10:20:25 -07:00
rm -rf /etc/systemd/system/gitea.service
2022-10-18 22:19:35 -07:00
sudo rm -rf /home/git
2022-10-18 22:17:44 -07:00
sudo userdel git
sudo rm -rf /usr/local/bin/gitea
sudo rm -rf /var/lib/gitea/*
sudo rm -rf /etc/gitea
2022-10-19 21:30:50 -07:00
sudo ufw delete allow 3000