From ca75c13ab3e1d920eb2d2641d3df06aa06e39303 Mon Sep 17 00:00:00 2001 From: Sophia Atkinson Date: Wed, 19 Oct 2022 01:40:21 -0700 Subject: [PATCH] Update 'scripts/giteainstall.sh' --- scripts/giteainstall.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/giteainstall.sh b/scripts/giteainstall.sh index 1ea1df2..7a7ba04 100644 --- a/scripts/giteainstall.sh +++ b/scripts/giteainstall.sh @@ -1,5 +1,13 @@ #!/bin/bash +while [ "$go" != 'y' ] && [ "$go" != 'n' ]; do + read -p "Would you like to install Gitea? (y/n) " go +done + +if [ "$go" == 'n' ]; then + exit +fi + sudo systemctl stop gitea sudo ufw allow 3000 sudo wget -O /usr/local/bin/gitea https://dl.gitea.io/gitea/1.17.3/gitea-1.17.3-linux-amd64 @@ -14,7 +22,9 @@ sudo chmod -Rv 770 /etc/gitea sudo wget -O /etc/systemd/system/gitea.service https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/systemd/gitea.service sudo systemctl enable --now gitea sudo systemctl start gitea +echo -e "==================================================================" publicipaddress=$(curl -sS --connect-timeout 10 -m 60 https://ipv4.icanhazip.com/) intenalip=$(ip addr | grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -E -v "^127\.|^255\.|^0\." | head -n 1) echo "Gitea Should be available at http://${intenalip}:3000" echo "Or If you are using a VPS at http://${publicipaddress}:3000" +echo -e "=================================================================="