Update 'scripts/gitearemove.sh'

This commit is contained in:
Sophia Atkinson 2022-10-20 10:58:46 -07:00
parent 2a1f896c2d
commit 171133189f
1 changed files with 15 additions and 7 deletions

View File

@ -1,13 +1,21 @@
#!/bin/bash
while [ "$go" != 'y' ] && [ "$go" != 'n' ]; do
read -p "Would you like to uninstall Gitea? This is not reversible. (y/n) " go
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 wasnt an option"
;;
esac
done
if [ "$go" == 'n' ]; then
exit
fi
sudo systemctl stop gitea
sudo systemctl disable gitea
sudo rm -rf /home/git