Deprectated GetExternalResources script

Functionality is now added to init sh off CT that need external resources
This commit is contained in:
2022-07-02 21:28:29 +02:00
parent 1aadb13bde
commit d47e3d8ebe
17 changed files with 54 additions and 75 deletions

View File

@@ -1,10 +1,11 @@
#!/bin/ash
#Get Resources
curl -L --retry 7 --retry-delay 5 http://dl-4.alpinelinux.org/alpine/MIRRORS.txt -o /etc/apt-cacher-ng/alpine_mirrors
curl -L --retry 7 --retry-delay 5 https://www.centos.org/download/full-mirrorlist.csv | sed 's/^.*"http:/http:/' | sed 's/".*$//' | grep ^http > /etc/apt-cacher-ng/centos_mirrors
#Allow apt-cacher-ng to use port 80
setcap 'cap_net_bind_service=+ep' /usr/sbin/apt-cacher-ng
#Move configs in place
mv /opt/Setup/Configs/acng.conf /etc/apt-cacher-ng/acng.conf
mv /opt/Setup/centos_mirrors /etc/apt-cacher-ng/centos_mirrors
mv /opt/Setup/alpine_mirrors /etc/apt-cacher-ng/alpine_mirrors
mv /opt/Setup/Scripts/UpdateMirrorList.sh /opt/UpdateMirrorList.sh
#Enable apt-cacher-ng on startup
ln -s /lib/systemd/system/apt-cacher-ng.service /etc/systemd/system/multi-user.target.wants/apt-cacher-ng.service

View File

@@ -1,4 +1,7 @@
#!/bin/bash
#Get Resources
curl -L --retry 7 --retry-delay 5 https://releases.domoticz.com/releases/release/domoticz_linux_x86_64.tgz -o "/opt/Setup/domoticz.tgz"
#Adding service user
adduser --system --shell /bin/bash --group --disabled-password --home /home/domoticz domoticz
#Crating folders

View File

@@ -1,4 +1,12 @@
#!/bin/bash
#Get Resources
##Duplicate get latest (Working with mono-devel )
CurrentVersion=$(curl -s https://api.github.com/repos/duplicati/duplicati/releases | grep 'tag_name.*' | grep 'beta' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " " |head -n 1)
##Duplicati get older version (Working with only the runtime installed)
#CurrentVersion="v2.0.5.1-2.0.5.1_beta_2020-01-18"
echo $CurrentVersion > /opt/Duplicati-installed
curl -L --retry 7 --retry-delay 5 $(curl -s https://api.github.com/repos/duplicati/duplicati/releases/tags/"$CurrentVersion" | grep browser_download_url | grep .zip |grep -v signatures | sed -e s#^.*https#https# | tr -d \") -o /opt/Setup/duplicati.zip
#Extract duplicati
unzip /opt/Setup/duplicati.zip -d /opt/duplicati
#Remove Archive

View File

@@ -1,4 +1,8 @@
#!/bin/ash
#Get Resources
CurrentVersion=$(curl -s https://api.github.com/repos/elkarbackup/elkarbackup/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " ")
echo $CurrentVersion > /opt/Elkarbackup-installed
curl -L --retry 7 --retry-delay 5 https://github.com/elkarbackup/elkarbackup/archive/refs/tags/$CurrentVersion.tar.gz -o /opt/Setup/elkb.tar.gz
#Install Composer
EXPECTED_CHECKSUM="$(curl -L https://composer.github.io/installer.sig)"
@@ -22,7 +26,6 @@ rm -f /opt/Setup/elkb.tar.gz
chown -R nginx:nginx /opt/elkarbackup
sudo -u nginx php /opt/composer/composer.phar install -n --working-dir=/opt/elkarbackup/srv --no-dev
mv /opt/Setup/Configs/elkarbackupconf.yaml /opt/elkarbackup/srv/config/parameters.yaml
mv /opt/Setup/Elkarbackup-installed /opt/Elkarbackup-installed
sed -i 's#/var/cache/nginx#/opt/elkarbackup/home#g' /etc/passwd
mv /opt/Setup/Scripts/updateElkarbackup.sh /opt/updateElkarbackup.sh

View File

@@ -1,4 +1,6 @@
#!/bin/bash
#Get Resources
curl -L --retry 7 --retry-delay 5 http://ftp.debian.org/debian/pool/main/r/rsnapshot/rsnapshot_1.4.2-1_all.deb -o /opt/Setup/rsnapshot.deb
#Install elkarbackup
apt install /opt/Setup/rsnapshot.deb elkarbackup -y
echo "Apt intall being unable to configure elkarbackup is expected"

View File

@@ -1,4 +1,14 @@
#!/bin/ash
#Get Resources
curl -L --retry 7 --retry-delay 5 GetAddr -o /opt/Setup/File
git clone https://git.bprieshof.nl/Tools/MailBackup-sys.git /opt/Setup/MailBackup-sys
CurrentVersion=$(curl -s https://api.github.com/repos/RainLoop/rainloop-webmail/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " ")
OfflineIMAPVer=$(curl -s https://api.github.com/repos/OfflineIMAP/offlineimap3/tags | grep 'name.*' |head -n 1 | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " ")
echo $CurrentVersion > /opt/Setup/rainloop-installed
curl -L --retry 7 --retry-delay 5 http://www.rainloop.net/repository/webmail/rainloop-community-latest.zip -o /opt/Setup/rlcl.zip
echo "$OfflineIMAPVer" > CT-Files/mailbackup/OfflineIMAP3-installed
curl -L --retry 7 --retry-delay 5 https://github.com/OfflineIMAP/offlineimap3/archive/refs/tags/$OfflineIMAPVer.tar.gz -o /opt/Setup/olim3.tar.gz
#Install and configure using git.bprieshof.nl MailBackup-sys
DistoBuilderINT=true ResourceFolder=/opt/Setup ash /opt/Setup/MailBackup-sys/install.sh

View File

@@ -1,4 +1,9 @@
#!/bin/bash
#Get Resources
CurrentVersion=$(curl -s https://api.github.com/repos/phpmyadmin/phpmyadmin/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " ")
echo $CurrentVersion > /opt/phpmyadmin-installed
curl -L --retry 7 --retry-delay 5 "$GetAddr" -o "/opt/Setup/phpmyadmin.tar.gz"
#Configure MySQL
rm -rf /etc/mysql/ /etc/my.cnf.d/ /etc/my.cnf
mkdir /etc/mysql/
@@ -11,7 +16,6 @@ tar -C /opt/PhpMyAdmin -xzf /opt/Setup/phpmyadmin.tar.gz --strip 1
rm -rf /opt/Setup/phpmyadmin.tar.gz
mv /opt/Setup/Configs/config.inc.php /opt/PhpMyAdmin/config.inc.php
mv /opt/Setup/Configs/phpmyadmin.service /etc/systemd/system/phpmyadmin.service
mv /opt/Setup/phpmyadminVersion /opt/phpmyadmin-installed
mv /opt/Setup/Scripts/UpdatePhpMyadmin.sh /opt/UpdatePhpMyadmin.sh
chmod +x /etc/systemd/system/phpmyadmin.service
ln -s /etc/systemd/system/phpmyadmin.service /etc/systemd/system/multi-user.target.wants/phpmyadmin.service

View File

@@ -1,4 +1,7 @@
#!/bin/ash
#Get Resources
curl -L --retry 7 --retry-delay 5 https://download.nextcloud.com/server/releases/latest.tar.bz2 -o /opt/Setup/nextcloud.tar.bz2
#Configure Nginx
rm -rf /etc/nginx/conf.d
mv /opt/Setup/Configs/nginx.conf /etc/nginx/nginx.conf

View File

@@ -1,4 +1,7 @@
#!/bin/ash
#Get Resources
curl -L --retry 7 --retry-delay 5 https://codeload.github.com/acmesh-official/acme.sh/tar.gz/master -o /opt/Setup/Fileacmesh.tar.gz
#Configure Nginx
mkdir -p /etc/nginx/sites-available /etc/nginx/sites-enabled /etc/nginx/snippets /etc/nginx/modules-available /etc/nginx/modules-enabled /etc/nginx/snippets/
rm -rf /etc/nginx/conf.d/*

View File

@@ -1,4 +1,6 @@
#!/bin/bash
#Install omada
#Get Resources
curl -L --retry 7 --retry-delay 5 https://static.tp-link.com/2020/202012/20201225/Omada_v3.2.14_linux_x64.deb -o /opt/Setup/omada.deb
#Install Omada
apt install /opt/Setup/omada.deb -y
rm /opt/Setup/omada.deb

View File

@@ -1,12 +1,16 @@
#!/bin/ash
#Get Resources
curl -L --retry 7 --retry-delay 5 GetAddr -o /opt/Setup/File
CurrentVersion=$(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 $CurrentVersion > /opt/transfer.sh/Version
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
#Setup
addgroup transfersh
adduser -S -s /bin/ash -h /home/transfersh -D -G transfersh transfersh
mkdir -p /opt/transfer.sh/CustomTheme
#Install transfer.sh custom theme
tar -C /opt/transfer.sh/CustomTheme -xzf /opt/Setup/CustomTheme.tar.gz
#Install transfer.sh
mv /opt/Setup/transfersh-linux-amd64 /opt/transfer.sh/transfersh-linux-amd64
mv /opt/Setup/transfershVersion /opt/transfer.sh/Version
git clone https://git.bprieshof.nl/DarkTheme/brammp_transfer.sh-web.git /opt/transfer.sh/CustomTheme
#Configure transfer.sh
mv /opt/Setup/Configs/transfersh.conf /opt/transfer.sh/transfersh.conf
mv /opt/Setup/Configs/transfersh.service /etc/init.d/transfersh