29 lines
659 B
Bash
29 lines
659 B
Bash
#!/usr/bin/env bash
|
|
|
|
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
|
|
;;
|
|
*)
|
|
echo "That wasn't an option..."
|
|
;;
|
|
esac
|
|
done
|
|
sudo systemctl stop gitea
|
|
sudo systemctl disable gitea
|
|
sudo rm -rf /etc/systemd/system/gitea.service
|
|
sudo rm -rf /home/git
|
|
sudo userdel git
|
|
sudo rm -rf /usr/local/bin/gitea
|
|
sudo rm -rf /var/lib/gitea/*
|
|
sudo rm -rf /etc/gitea
|
|
sudo ufw delete allow 3000
|
|
|