CT: gitea Fixed broken curl command for downloading gitea CT: nextcloud Forced PHP Version to 8.3 using update AlpinePHPTool CT: transfersh Fixed custom theme by downloading the release tar.gz instead of cloneing the repo, it is now also added to the update script Script: AlpinePHPTool Added ability to specify a PHP Version
36 lines
1.1 KiB
Bash
36 lines
1.1 KiB
Bash
#!/bin/ash
|
|
#Get latest gitea version info
|
|
giteaver=$(curl --retry 7 --retry-delay 5 -Ls https://api.github.com/repos/go-gitea/gitea/releases/latest |jq -r .tag_name)
|
|
giteaver=${giteaver//v}
|
|
|
|
|
|
#Add gitea `git` service user
|
|
addgroup git
|
|
adduser -S -s /bin/ash -g 'Git Version Control' -h /home/git -D -G git git
|
|
|
|
#Making Gitea Folders
|
|
mkdir -p /gitea-data
|
|
mkdir -p /var/lib/gitea/custom/public
|
|
mkdir -p /var/lib/gitea/data
|
|
mkdir -p /var/log/gitea
|
|
mkdir -p /etc/gitea
|
|
|
|
#Download Gitea binary
|
|
echo "Downloading gitea binary..."
|
|
curl --retry 7 --retry-delay 5 -L https://dl.gitea.io/gitea/"$giteaver"/gitea-"$giteaver"-linux-amd64 -o /usr/local/bin/gitea || exit 1
|
|
|
|
#Moving configs in place
|
|
mv /opt/Setup/Configs/app.ini /etc/gitea/app.ini
|
|
mv /opt/Setup/Configs/gitea.service /etc/init.d/gitea
|
|
mv /opt/Setup/Scripts/Update-Gitea.sh /opt/Update-Gitea.sh
|
|
|
|
#Set folder permissions
|
|
chown -R git:git /gitea-data
|
|
chown -R git:git /var/log/gitea
|
|
chown -R git:git /var/lib/gitea/
|
|
chown -R root:git /etc/gitea
|
|
chmod -R 750 /var/lib/gitea/
|
|
chmod +x /usr/local/bin/gitea
|
|
chmod +x /etc/init.d/gitea
|
|
chmod 750 /etc/gitea
|
|
chmod 640 /etc/gitea/app.ini |