all: echo OK install-debian: install-dependencies-debian create-user-debian download-gitea create-directories install-gitea-binary install-systemd-service install-nginx-debian install-rocky: install-dependencies-rocky create-user-rocky download-gitea create-directories install-gitea-binary install-systemd-service install-nginx-rocky install-dependencies-debian: apt -y install git vim bash-completion jq apt -y install mariadb-server git --version install-dependencies-rocky: dnf -y install git vim bash-completion jq dnf -y install mariadb-server git --version create-user-debian: adduser --system --shell /bin/bash --gecos 'Git Version Control' \ --group --disabled-password --home /home/git git create-user-rocky: adduser --system --shell /bin/bash -d /home/git git download-gitea: bash download-gitea.sh install-gitea-binary: cp -vf gitea-linux-amd64 /usr/local/bin/gitea chmod +x /usr/local/bin/gitea gitea --version create-directories: mkdir -vp /etc/gitea mkdir -vp /var/lib/gitea/custom mkdir -vp /var/lib/gitea/data mkdir -vp /var/lib/gitea/indexers mkdir -vp /var/lib/gitea/public mkdir -vp /var/lib/gitea/logs chown git:git /var/lib/gitea/data chown git:git /var/lib/gitea/indexers chown git:git /var/lib/gitea/logs chmod 750 /var/lib/gitea/data chmod 750 /var/lib/gitea/indexers chmod 750 /var/lib/gitea/logs chown root:git /etc/gitea chmod 770 /etc/gitea install-systemd-service: cp -vf gitea.service /etc/systemd/system/gitea.service enable-service: systemctl daemon-reload systemctl enable gitea start: systemctl start gitea restart: systemctl restart gitea stop: systemctl stop gitea disable-service: systemctl daemon-reload systemctl disable gitea status: systemctl status gitea --no-pager install-nginx-debian: apt -y install nginx install-nginx-rocky: dnf -y install nginx