This repository has been archived on 2024-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
thelinuxlist/scripts/giteaupdate.sh

28 lines
746 B
Bash
Raw Normal View History

2022-12-27 03:12:00 -08:00
#!/bin/bash
while true
do
read -r -p "Would you like to Update Gitea? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
break
;;
[nN][oO]|[nN])
break
;;
*)
echo "That wasn't an option..."
;;
esac
done
2023-01-18 02:55:12 -08:00
GITEA_VER="1.18.1"
2022-12-27 03:12:00 -08:00
sudo systemctl stop gitea
sudo wget -O /usr/local/bin/gitea https://dl.gitea.io/gitea/$GITEA_VER/gitea-"$GITEA_VER"-linux-amd64
sudo chmod +x /usr/local/bin/gitea
sudo chown -Rv git:git /var/lib/gitea
sudo chmod -Rv 750 /var/lib/gitea
sudo chown -Rv root:git /etc/gitea
sudo chmod -Rv 770 /etc/gitea
sudo systemctl start gitea
echo "Gitea has been updated!"