Last active
June 25, 2018 10:18
-
-
Save MKRhere/286e1468cc2b964a89bad7c853eaedf9 to your computer and use it in GitHub Desktop.
Gitea installation script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My Dependencies: systemd to daemonise process, nginx as reverse proxy | |
latest=$(curl -sL https://api.github.com/repos/go-gitea/gitea/releases | awk '/"name":/ { print $2; exit; }') | |
latest=${latest//[\"v,]/} | |
curl -sL https://dl.gitea.io/gitea/$latest/gitea-$latest-linux-amd64 -o gitea | |
chmod +x gitea | |
sudo useradd -m git | |
sudo mkdir /home/git/gitea | |
sudo mv gitea /home/git/gitea/ | |
sudo chown -R git:git /home/git/gitea | |
echo "[Unit] | |
Description=Gitea | |
After=network.target | |
After=nginx.service | |
[Service] | |
Type=simple | |
User=git | |
WorkingDirectory=/home/git/gitea | |
ExecStart=/home/git/gitea/gitea | |
Restart=on-failure | |
[Install] | |
WantedBy=multi-user.target" | sudo tee /etc/systemd/system/gitea.service | |
sudo systemctl enable gitea | |
sudo systemctl start gitea |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment