From 59019f4917352d5f1319deae01df5cb074484985 Mon Sep 17 00:00:00 2001 From: Sarimoko Date: Mon, 19 Jul 2021 05:00:09 +0000 Subject: [PATCH] Update 'install.sh' --- install.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) 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