Added transfersh CT
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -2,4 +2,7 @@
|
|||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.tar
|
*.tar
|
||||||
/distrobuilder
|
/distrobuilder
|
||||||
CT-Files/nginx/nginx_signing.rsa.pub
|
CT-Files/nginx/nginx_signing.rsa.pub
|
||||||
|
CT-Files/transfersh/transfersh-linux-amd64
|
||||||
|
CT-Files/transfersh/transfershVersion
|
||||||
|
CT-Files/domoticz/domoticz.tgz
|
||||||
@@ -294,6 +294,13 @@ files:
|
|||||||
variants:
|
variants:
|
||||||
- ddns
|
- ddns
|
||||||
|
|
||||||
|
#FileForTransfersh
|
||||||
|
- path: /opt/Setup
|
||||||
|
generator: copy
|
||||||
|
source: CT-Files/transfersh
|
||||||
|
variants:
|
||||||
|
- transfersh
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
manager: apk
|
manager: apk
|
||||||
update: true
|
update: true
|
||||||
@@ -337,6 +344,13 @@ packages:
|
|||||||
variants:
|
variants:
|
||||||
- ddns
|
- ddns
|
||||||
|
|
||||||
|
#PKGS for Transfersh
|
||||||
|
- packages:
|
||||||
|
- curl
|
||||||
|
action: install
|
||||||
|
variants:
|
||||||
|
- transfersh
|
||||||
|
|
||||||
repositories:
|
repositories:
|
||||||
- name: /etc/apk/repositories
|
- name: /etc/apk/repositories
|
||||||
url: |-
|
url: |-
|
||||||
@@ -384,6 +398,7 @@ actions:
|
|||||||
- gitea
|
- gitea
|
||||||
- nginx
|
- nginx
|
||||||
- ddns
|
- ddns
|
||||||
|
- transfersh
|
||||||
|
|
||||||
mappings:
|
mappings:
|
||||||
architecture_map: alpinelinux
|
architecture_map: alpinelinux
|
||||||
|
|||||||
Binary file not shown.
5
CT-Files/transfersh/Configs/transfersh.conf
Normal file
5
CT-Files/transfersh/Configs/transfersh.conf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
LISTENER=:8080
|
||||||
|
TEMP_PATH=/tmp
|
||||||
|
PROVIDER=local
|
||||||
|
BASEDIR=/opt/transfer.sh/store
|
||||||
|
#ForFutureDarkTheme#WEB_PATH=/opt/transfer.sh/CustomTheme
|
||||||
13
CT-Files/transfersh/Configs/transfersh.service
Normal file
13
CT-Files/transfersh/Configs/transfersh.service
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
supervisor=supervise-daemon
|
||||||
|
name=transfersh
|
||||||
|
command="/opt/transfer.sh/transfersh-linux-amd64"
|
||||||
|
command_user="transfersh"
|
||||||
|
supervise_daemon_args="$(sed -e '/^#/d' -e 's/^/--env /' /opt/transfer.sh/transfersh.conf | xargs)"
|
||||||
|
pidfile="/run/gitea.pid"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
use logger dns
|
||||||
|
need net
|
||||||
|
}
|
||||||
16
CT-Files/transfersh/Scripts/Init.sh
Normal file
16
CT-Files/transfersh/Scripts/Init.sh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/ash
|
||||||
|
addgroup transfersh
|
||||||
|
adduser -S -s /bin/ash -h /home/transfersh -D -G transfersh transfersh
|
||||||
|
mkdir -p /opt/transfer.sh/CustomTheme
|
||||||
|
#Move files in place
|
||||||
|
#ForFutureDarkTheme#tar -C /opt/transfer.sh/CustomTheme -xzf /opt/Setup/CustomTheme.tar.gz
|
||||||
|
mv /opt/Setup/transfersh-linux-amd64 /opt/transfer.sh/transfersh-linux-amd64
|
||||||
|
mv /opt/Setup/Configs/transfersh.conf /opt/transfer.sh/transfersh.conf
|
||||||
|
mv /opt/Setup/Configs/transfersh.service /etc/init.d/transfersh
|
||||||
|
mv /opt/Setup/transfershVersion /opt/transfer.sh/Version
|
||||||
|
#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
|
||||||
18
CT-Files/transfersh/Scripts/update.sh
Normal file
18
CT-Files/transfersh/Scripts/update.sh
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/ash
|
||||||
|
. /opt/transfer.sh/Version
|
||||||
|
|
||||||
|
CurtransfershVersion=$(curl -s https://api.github.com/repos/dutchcoders/transfer.sh/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " ")
|
||||||
|
|
||||||
|
if test "$CurtransfershVersion" = "$transfershVersion" ; then
|
||||||
|
echo 'Transfer.sh up-to-date'
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo 'Updating Transfer.sh'
|
||||||
|
service transfersh stop
|
||||||
|
mv /opt/transfer.sh/transfersh-linux-amd64 /opt/transfer.sh/transfersh-linux-amd64.old
|
||||||
|
curl -L -o /opt/transfer.sh/transfersh-linux-amd64 https://github.com/dutchcoders/transfer.sh/releases/download/"$CurtransfershVersion"/transfersh-"$CurtransfershVersion"-linux-amd64
|
||||||
|
chmod +x /opt/transfer.sh/transfersh-linux-amd64
|
||||||
|
chown transfersh:transfersh /opt/transfer.sh/transfersh-linux-amd64
|
||||||
|
echo "transfershVersion=$CurtransfershVersion" > /opt/transfer.sh/Version
|
||||||
|
service transfersh start
|
||||||
|
fi
|
||||||
@@ -10,8 +10,13 @@ GetResource () {
|
|||||||
curl -L --retry 7 --retry-delay 5 "$GetAddr" -o "CT-Files/$Variant/$FileName"
|
curl -L --retry 7 --retry-delay 5 "$GetAddr" -o "CT-Files/$Variant/$FileName"
|
||||||
}
|
}
|
||||||
|
|
||||||
#PhpMyadmin for mysql variant
|
|
||||||
GetResource mysql phpmyadmin.tar.gz https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-english.tar.gz
|
GetResource mysql phpmyadmin.tar.gz https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-english.tar.gz
|
||||||
GetResource nginx nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub
|
GetResource nginx nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub
|
||||||
GetResource nginx acmesh.tar.gz https://codeload.github.com/acmesh-official/acme.sh/tar.gz/master
|
GetResource nginx acmesh.tar.gz https://codeload.github.com/acmesh-official/acme.sh/tar.gz/master
|
||||||
GetResource domoticz domoticz.tgz https://releases.domoticz.com/releases/release/domoticz_linux_x86_64.tgz
|
GetResource domoticz domoticz.tgz https://releases.domoticz.com/releases/release/domoticz_linux_x86_64.tgz
|
||||||
|
|
||||||
|
transfershVersion=$(curl -s https://api.github.com/repos/dutchcoders/transfer.sh/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " ")
|
||||||
|
echo "transfershVersion=$transfershVersion" > CT-Files/transfersh/transfershVersion
|
||||||
|
GetResource transfersh transfersh-linux-amd64 https://github.com/dutchcoders/transfer.sh/releases/download/"$transfershVersion"/transfersh-"$transfershVersion"-linux-amd64
|
||||||
|
#ForFutureDarkTheme#GetResource transfersh CustomTheme.tar.gz https://git.bprieshof.nl/attachments/e014dc2e-8b43-48bb-a771-da34e4d6fdef
|
||||||
Reference in New Issue
Block a user