Skip to content

Instantly share code, notes, and snippets.

@daxxog
Last active April 23, 2020 17:18
Show Gist options
  • Save daxxog/880439a0d6a943bae8d8b1c88af60cc4 to your computer and use it in GitHub Desktop.
Save daxxog/880439a0d6a943bae8d8b1c88af60cc4 to your computer and use it in GitHub Desktop.
Install gitea quick on ubuntu with fast defaults
#!/bin/bash
#curl -L https://gist.githubusercontent.com/daxxog/880439a0d6a943bae8d8b1c88af60cc4/raw/gitea-quick-sqlite.sh | sh
GITEA_RELEASE=1.11.4
sudo apt install -y git
cd ~
mkdir .gitea
cd .gitea
mkdir gitea-${GITEA_RELEASE}
cd gitea-${GITEA_RELEASE}
curl -L https://dl.gitea.io/gitea/${GITEA_RELEASE}/gitea-${GITEA_RELEASE}-linux-amd64.xz | xz -d > gitea
chmod +x gitea
GITEAD=$(pwd)/gitea
#daemonize gitea and run gitea on startup
sudo touch /etc/init.d/gitead
curl -L https://gist.githubusercontent.com/daxxog/a0cbff1f1b0892c5550f117f9387dec7/raw/gitead-p1.sh > ~/._tmpgitead
echo "sudo -u ${USER} nohup ${GITEAD} >> /dev/null &" >> ~/._tmpgitead
curl -L https://gist.githubusercontent.com/daxxog/b32c8e51a8d6ccee10bdbb8193646344/raw/gitead-p2.sh >> ~/._tmpgitead
sudo chown root ~/._tmpgitead
sudo mv ${HOME}/._tmpgitead /etc/init.d/gitead
sudo chmod 755 /etc/init.d/gitead
sudo update-rc.d gitead defaults
cat /etc/init.d/gitead
#start gitea
sudo /etc/init.d/gitead start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment