diff --git a/install.sh b/install.sh index d6d9d34..5bdf1d9 100644 --- a/install.sh +++ b/install.sh @@ -1 +1,27 @@ -blah \ No newline at end of file +sudo apt update -qq && sudo apt upgrade -y +sudo apt install -y git lamp-server^ +sudo a2enmod ssl +sudo adduser \ + --system \ + --shell /bin/bash \ + --gecos 'Git Version Control' \ + --group \ + --disabled-password \ + --home /home/git \ + git +VERSION=1.14.4 +sudo wget -O /tmp/gitea https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64 +sudo mv /tmp/gitea /usr/local/bin +sudo chmod +x /usr/local/bin/gitea +sudo mkdir -p /var/lib/gitea/{custom,data,log} +sudo chown -R git:git /var/lib/gitea/ +sudo chmod -R 750 /var/lib/gitea/ +sudo mkdir /etc/gitea +sudo chown root:git /etc/gitea +sudo chmod 770 /etc/gitea +sudo wget https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/systemd/gitea.service -P /etc/systemd/system/ +sudo systemctl daemon-reload +sudo systemctl enable --now gitea +sudo ufw allow 3000/tcp +sudo chmod 750 /etc/gitea +sudo chmod 640 /etc/gitea/app.ini \ No newline at end of file