Files
Bram Prieshof 5c663faa0d Fixed CTs: gitea,nextcloud,transfersh and updated the AlpinePHPTool
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
2025-01-16 01:32:19 +01:00

30 lines
1.4 KiB
Bash

#!/bin/ash
#Setup
addgroup transfersh
adduser -S -s /bin/ash -h /home/transfersh -D -G transfersh transfersh
mkdir -p /opt/transfer.sh/CustomTheme
#Get Resources
CurrentVersion=$(curl -s https://api.github.com/repos/dutchcoders/transfer.sh/releases/latest | jq -r .tag_name)
CurrentThemeVersion=$(curl -s https://git.bprieshof.nl/api/v1/repos/DarkTheme/brammp_transfer.sh-web/releases/latest |jq -r .tag_name)
echo $CurrentVersion > /opt/transfer.sh/Version
echo $CurrentThemeVersion > /opt/transfer.sh/ThemeVersion
curl -L --retry 7 --retry-delay 5 https://github.com/dutchcoders/transfer.sh/releases/download/"$CurrentVersion"/transfersh-"$CurrentVersion"-linux-amd64 -o /opt/transfer.sh/transfersh-linux-amd64 || exit 1
curl -L --retry 7 --retry-delay 5 https://git.bprieshof.nl/DarkTheme/brammp_transfer.sh-web/releases/download/"$CurrentThemeVersion"/brammp_transfer.sh-web-"$CurrentThemeVersion".tar.gz -o /tmp/brammp_transfer.sh-web.tar.gz || exit 1
#Install transfer.sh custom theme
tar -zxf /tmp/brammp_transfer.sh-web.tar.gz -C /opt/transfer.sh/CustomTheme
rm /tmp/brammp_transfer.sh-web.tar.gz
#Configure transfer.sh
mv /opt/Setup/Configs/transfersh.conf /opt/transfer.sh/transfersh.conf
mv /opt/Setup/Configs/transfersh.service /etc/init.d/transfersh
#Setting permissions
chmod +x /etc/init.d/transfersh
chmod +x /opt/transfer.sh/transfersh-linux-amd64
chown -R transfersh:transfersh /opt/transfer.sh
#Enable service
rc-update add transfersh