Add 'scripts/gogsuninstall.sh'

This commit is contained in:
Sophia Atkinson 2022-10-21 10:19:57 -07:00
parent fbb3629928
commit f83e5dad6a
1 changed files with 25 additions and 0 deletions

25
scripts/gogsuninstall.sh Normal file
View File

@ -0,0 +1,25 @@
#!/bin/bash
while true
do
read -r -p "Would you like to install Gogs? 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 gogs
sudo systemctl disable gogs
rm -rf /etc/systemd/system/gogs.service
sudo userdel git
sudo rm -rf /home/git
sudo rm -rf /var/log/gogs/*
sudo ufw delete allow 3000