Fixed CT's : elkarbackupALP,duplicati,OmadaV3,transfersh,hass,pihole

Github updated api and now appends a semicolon to versions, added `tr -d :` to list for url filtering
elkarbackupALP:
* Github api Fix
duplicati:
* Github api fix
* Enabled in jenkinsfile
OmadaV3:
* Added Stop command for omada after installation to avoid DB corruption
* Moved automaticaly installed dependencies to package list
transfersh:
* Github api fix
hass:
* Added Missing python modules (sqlalchemy nvhash)
mailbackup:
* Github api fix
* Moved downlading of resources to project
pihole:
*Added support for ProxmoxHelper App updater
This commit is contained in:
2022-09-07 01:02:50 +02:00
parent ef4356b95d
commit 7a0de87698
20 changed files with 39 additions and 29 deletions

View File

@@ -532,7 +532,9 @@ packages:
- php8-fpm - php8-fpm
- php8-curl - php8-curl
- php8-dom - php8-dom
- php8-iconv - php8-zip
- php8-mbstring
- php-openssl
- py3-pip - py3-pip
- sudo - sudo
- git - git

View File

@@ -7,7 +7,7 @@ pipeline {
string defaultValue: '192.168.200.11', description: 'Proxy server for packages, when enabled', name: 'ProxyServer' string defaultValue: '192.168.200.11', description: 'Proxy server for packages, when enabled', name: 'ProxyServer'
booleanParam description: 'will disable use of proxy server', name: 'DisProxy' booleanParam description: 'will disable use of proxy server', name: 'DisProxy'
checkboxParameter(name: 'ImgVariantList', format: 'JSON', displayNodePath: "//Variants/Variant", valueNodePath: "//Variants/Variant", description: 'Select the variant(s) that should be build', checkboxParameter(name: 'ImgVariantList', format: 'JSON', displayNodePath: "//Variants/Variant", valueNodePath: "//Variants/Variant", description: 'Select the variant(s) that should be build',
pipelineSubmitContent: '{"Variants": [{"Variant": "minimal"},{"Variant": "default"},{"Variant": "jenkinsbuilder"},{"Variant": "imgbuilder"},{"Variant": "jenkins"},{"Variant": "mysql"},{"Variant": "pihole"},{"Variant": "collabora"},{"Variant": "jellyfin"},{"Variant": "domoticz"},{"Variant": "omadaV3"},{"Variant": "docker"},{"Variant": "smb"},{"Variant": "tvheadend"},{"Variant": "x2go"},{"Variant": "aptcacherng"},{"Variant": "elkarbackupDEB"},{"Variant": "nfs"},{"Variant": "fileshelter"}]}') pipelineSubmitContent: '{"Variants": [{"Variant": "minimal"},{"Variant": "default"},{"Variant": "jenkinsbuilder"},{"Variant": "imgbuilder"},{"Variant": "jenkins"},{"Variant": "mysql"},{"Variant": "pihole"},{"Variant": "collabora"},{"Variant": "jellyfin"},{"Variant": "domoticz"},{"Variant": "omadaV3"},{"Variant": "docker"},{"Variant": "smb"},{"Variant": "tvheadend"},{"Variant": "x2go"},{"Variant": "aptcacherng"},{"Variant": "elkarbackupDEB"},{"Variant": "nfs"},{"Variant": "duplicati"},{"Variant": "fileshelter"}]}')
} }
options { options {
skipDefaultCheckout() skipDefaultCheckout()

View File

@@ -1198,6 +1198,8 @@ packages:
#OmadaV3 pkgs #OmadaV3 pkgs
- packages: - packages:
- curl - curl
- jsvc
- libcommons-daemon-java
action: install action: install
variants: variants:
- omadaV3 - omadaV3

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
#Get Resources #Get Resources
##Duplicate get latest (Working with mono-devel ) ##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) 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 " " |tr -d : |head -n 1)
##Duplicati get older version (Working with only the runtime installed) ##Duplicati get older version (Working with only the runtime installed)
#CurrentVersion="v2.0.5.1-2.0.5.1_beta_2020-01-18" #CurrentVersion="v2.0.5.1-2.0.5.1_beta_2020-01-18"
echo $CurrentVersion > /opt/Duplicati-installed echo $CurrentVersion > /opt/Duplicati-installed

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
#Get latest vesion #Get latest vesion
NewDuplicatiVer=$(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) NewDuplicatiVer=$(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 " " |tr -d : |head -n 1)
#Compare versions to check for update #Compare versions to check for update
if [ "$NewDuplicatiVer" = "$(cat /opt/Duplicati-installed)" ] ; then if [ "$NewDuplicatiVer" = "$(cat /opt/Duplicati-installed)" ] ; then

View File

@@ -1,6 +1,6 @@
#!/bin/ash #!/bin/ash
#Get Resources #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 " ") 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 " " |tr -d : )
echo $CurrentVersion > /opt/Elkarbackup-installed 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 || exit 1 curl -L --retry 7 --retry-delay 5 https://github.com/elkarbackup/elkarbackup/archive/refs/tags/$CurrentVersion.tar.gz -o /opt/Setup/elkb.tar.gz || exit 1
@@ -43,6 +43,7 @@ mv /opt/Setup/Configs/crontab /etc/crontabs/nginx
#Configure Sudo #Configure Sudo
mv /opt/Setup/Configs/sudofile /etc/sudoers.d/elkarbackup mv /opt/Setup/Configs/sudofile /etc/sudoers.d/elkarbackup
chown 0:0 /etc/sudoers.d/elkarbackup
#Enable services on boot #Enable services on boot
rc-update add nginx rc-update add nginx

View File

@@ -1,6 +1,6 @@
#!/bin/ash #!/bin/ash
NewElkarbackupVersion=$(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 " ") NewElkarbackupVersion=$(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 " " |tr -d : )
if test "$NewElkarbackupVersion" = "$(cat /opt/Elkarbackup-installed)" ; then if test "$NewElkarbackupVersion" = "$(cat /opt/Elkarbackup-installed)" ; then
echo 'Elkarbackup up-to-date' echo 'Elkarbackup up-to-date'

View File

@@ -12,5 +12,5 @@ if [ $ThisScriptConfigured = no ]; then
exit exit
fi fi
sed -i -e 's/DBServer/'$MysqlIP'/' -e 's/DBName/'$MysqlDatabase'/' -e 's/DBUser/'$MysqlUsername'/' -e 's/DBPass/'$MysqlPassword'/' -e 's/ElkarToken/'$(tr -dc 'A-Za-z0-9!#%()*+,-.:;<=>?@[]^_{|}~' 2>/dev/null </dev/urandom | head -c 20 ; echo )'/' /etc/elkarbackup/parameters.yaml sed -i -e 's/DBServer/'$MysqlIP'/' -e 's/DBName/'$MysqlDatabase'/' -e 's/DBUser/'$MysqlUsername'/' -e 's/DBPass/'$MysqlPassword'/' -e 's/ElkarToken/'$(tr -dc 'A-Za-z0-9!#%*+,-.:;<=>?@^_' 2>/dev/null </dev/urandom | head -c 20 ; echo )'/' /etc/elkarbackup/parameters.yaml
dpkg --configure -a dpkg --configure -a

View File

@@ -6,4 +6,6 @@ apt install /opt/Setup/rsnapshot.deb elkarbackup -y
echo "Apt intall being unable to configure elkarbackup is expected" echo "Apt intall being unable to configure elkarbackup is expected"
rm /opt/Setup/rsnapshot.deb rm /opt/Setup/rsnapshot.deb
mv /opt/Setup/Configs/elkarbackupconf.yaml /etc/elkarbackup/parameters.yaml mv /opt/Setup/Configs/elkarbackupconf.yaml /etc/elkarbackup/parameters.yaml
apt clean all apt clean all
#Configure apache
rm /etc/apache2/sites-enabled/000-default.conf

View File

@@ -7,7 +7,7 @@ addgroup hass
adduser -h /opt/HomeAssistant/data -D -G hass -s /bin/sh hass adduser -h /opt/HomeAssistant/data -D -G hass -s /bin/sh hass
chown -R hass:hass /opt/HomeAssistant chown -R hass:hass /opt/HomeAssistant
sudo -u hass python3 -m venv /opt/HomeAssistant/srv sudo -u hass python3 -m venv /opt/HomeAssistant/srv
sudo -u hass sh -c '. /opt/HomeAssistant/srv/bin/activate && pip install --upgrade pip && pip3 install wheel mysqlclient && pip3 install homeassistant' sudo -u hass sh -c '. /opt/HomeAssistant/srv/bin/activate && pip install --upgrade pip && pip3 install wheel mysqlclient sqlalchemy fnvhash && pip3 install homeassistant'
#Install Home Assistant Community Store #Install Home Assistant Community Store
sudo -u hass sh -c 'cd /opt/HomeAssistant/data && wget -O - https://get.hacs.xyz | bash -' sudo -u hass sh -c 'cd /opt/HomeAssistant/data && wget -O - https://get.hacs.xyz | bash -'

View File

@@ -1,15 +1,9 @@
#!/bin/ash #!/bin/ash
#Get Resources #Get Resources
git clone https://git.bprieshof.nl/Tools/MailBackup-sys.git /opt/Setup/MailBackup-sys 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 " " |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 || exit 1
echo "$OfflineIMAPVer" > /opt/Setup/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 || exit 1
#Install and configure using git.bprieshof.nl MailBackup-sys #Install and configure using git.bprieshof.nl MailBackup-sys
DistoBuilderINT=true ResourceFolder=/opt/Setup ash /opt/Setup/MailBackup-sys/install.sh DistoBuilderINT=true ash /opt/Setup/MailBackup-sys/install.sh
#cleanup #cleanup
rm -rf /opt/Setup/MailBackup-sys rm -rf /opt/Setup/MailBackup-sys

View File

@@ -0,0 +1,4 @@
#!/bin/sh
# Update script for updating apps with ProxmoxHelper/ProxMoxToolKit
ash /opt/UpdateOfflineImap3.sh
ash /opt/UpdateSnappyMail.sh

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
#Get Resources #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 " ") 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 " " |tr -d : )
echo $CurrentVersion > /opt/phpmyadmin-installed echo $CurrentVersion > /opt/phpmyadmin-installed
curl -L --retry 7 --retry-delay 5 https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-english.tar.gz -o "/opt/Setup/phpmyadmin.tar.gz" || exit 1 curl -L --retry 7 --retry-delay 5 https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-english.tar.gz -o "/opt/Setup/phpmyadmin.tar.gz" || exit 1

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
NewPhpMyAdminVersion=$(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 " ") NewPhpMyAdminVersion=$(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 " " |tr -d : )
if test "$NewPhpMyAdminVersion" = "$(cat /opt/phpmyadmin-installed)" ; then if test "$NewPhpMyAdminVersion" = "$(cat /opt/phpmyadmin-installed)" ; then
echo 'PhpMyAdmin up-to-date' echo 'PhpMyAdmin up-to-date'

View File

@@ -3,4 +3,7 @@
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 || exit 1 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 || exit 1
#Install Omada #Install Omada
apt install /opt/Setup/omada.deb -y apt install /opt/Setup/omada.deb -y
#Stoping Omdada (to prevent corrupting the DB)
/usr/bin/tpeap stop
#clean up
rm /opt/Setup/omada.deb rm /opt/Setup/omada.deb

View File

@@ -4,7 +4,7 @@ addgroup transfersh
adduser -S -s /bin/ash -h /home/transfersh -D -G transfersh transfersh adduser -S -s /bin/ash -h /home/transfersh -D -G transfersh transfersh
mkdir -p /opt/transfer.sh/CustomTheme mkdir -p /opt/transfer.sh/CustomTheme
#Get Resources #Get Resources
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 " ") 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 " " |tr -d : )
echo $CurrentVersion > /opt/transfer.sh/Version 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 || exit 1 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
#Install transfer.sh custom theme #Install transfer.sh custom theme

View File

@@ -1,5 +1,5 @@
#!/bin/ash #!/bin/ash
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 " ") 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 " " |tr -d : )
if test "$CurtransfershVersion" = "$(cat /opt/transfer.sh/Version)" ; then if test "$CurtransfershVersion" = "$(cat /opt/transfer.sh/Version)" ; then
echo 'Transfer.sh up-to-date' echo 'Transfer.sh up-to-date'

View File

@@ -110,12 +110,13 @@ Then select the created credential and click save
## gitea ## gitea
1. Edit the parameters in the FistRun script in the container `vi /opt/Setup/Scripts/FirstRun.sh` 1. Edit the parameters in the FistRun script in the container `vi /opt/Setup/Scripts/FirstRun.sh`
2. Run the FistRun script in the container `ash /opt/Setup/Scripts/FirstRun.sh` 2. Run the FistRun script in the container `ash /opt/Setup/Scripts/FirstRun.sh`
* Available on http://`<ip>`:3000
## nginx ## nginx
* Run the FistRun script in the container `ash /opt/Setup/Scripts/FirstRun.sh` * Run the FistRun script in the container `ash /opt/Setup/Scripts/FirstRun.sh`
## pihole ## pihole
* Run the FistRun script in the container `ash /opt/Setup/Scripts/FirstRun.sh` * Run the FistRun script in the container `bash /opt/Setup/Scripts/FirstRun.sh`
## collabora ## collabora
* Update the configuration in /etc/coolwsd/coolwsd.xml and reload the service `systemctl restart coolwsd` * Update the configuration in /etc/coolwsd/coolwsd.xml and reload the service `systemctl restart coolwsd`
@@ -133,7 +134,7 @@ Then select the created credential and click save
* To set-up the system follow the initial set-up wizard on http://`<ip>`:8088 * To set-up the system follow the initial set-up wizard on http://`<ip>`:8088
## docker ## docker
* Run the FistRun script in the container `ash /opt/Setup/Scripts/FirstRun.sh` * Run the FistRun script in the container `bash /opt/Setup/Scripts/FirstRun.sh`
This container can be set up in two ways This container can be set up in two ways
1. As controller with portainer 1. As controller with portainer
2. As remote with docker tcp on port 2375 2. As remote with docker tcp on port 2375
@@ -218,6 +219,11 @@ lxc.mount.entry: /dev/ttyACM-Zwave dev/ttyACM-Zwave none bind,optional,create=fi
* Default credentials: setup/setup * Default credentials: setup/setup
* Follow the setup wizzard after login, otherwise authentication will be disabled * Follow the setup wizzard after login, otherwise authentication will be disabled
## x2go
* Add a user by typing `adduser <username>`
* Set key auth only `sed -i -e '/PasswordAuthentication/c\PasswordAuthentication no' -e '/ChallengeResponseAuthentication/c\ChallengeResponseAuthentication no' /etc/ssh/sshd_config`
* Set ssh port `sed -i -e '/Port 22/c\Port <PortNr>' /etc/ssh/sshd_config`
## hass ## hass
* After first start of CT HomeAssistant will finish its installation this will take at least 10 minutes * After first start of CT HomeAssistant will finish its installation this will take at least 10 minutes
* HomeAssistant available on http://`<ip>`:8123 * HomeAssistant available on http://`<ip>`:8123
@@ -239,16 +245,17 @@ lxc.mount.entry: /dev/ttyACM-Zwave dev/ttyACM-Zwave none bind,optional,create=fi
* Add user/storage space by running `ash /opt/AddMailBox.sh` * Add user/storage space by running `ash /opt/AddMailBox.sh`
## heimdall ## heimdall
* available on http://`<ip>`:80 * Available on http://`<ip>`:80
## vouchproxy ## vouchproxy
* Default port 9090 * Default port 9090
* A script to setup another instance is located here: `/opt/AddVouchInstance.sh` * A script to setup another instance is located here: `/opt/AddVouchInstance.sh`
## elkarbackup ## elkarbackup
**Alpine version recommended**
1. Edit the parameters in the FistRun script in the container `vi /opt/Setup/Scripts/FirstRun.sh` 1. Edit the parameters in the FistRun script in the container `vi /opt/Setup/Scripts/FirstRun.sh`
2. Run the FistRun script in the container `ash /opt/Setup/Scripts/FirstRun.sh` 2. Run the FistRun script in the container `ash /opt/Setup/Scripts/FirstRun.sh`
3. Available on http://`<ip>` (Default username/password: root/root 3. Available on http://`<ip>` (Default username/password: root/root)
4. Click cogwheel/settings icon > Manage backup locations >New (make sure to create this directory and set ngix as the owner) 4. Click cogwheel/settings icon > Manage backup locations >New (make sure to create this directory and set ngix as the owner)
5. Add a retention policy under the `Policies` tab 5. Add a retention policy under the `Policies` tab
@@ -302,8 +309,3 @@ cd /iscsi/<server-iqn>/tpg1/luns
create <device> create <device>
exit exit
``` ```
## x2go
* Add a user by typing `adduser <username>`
* Set key auth only `sed -i -e '/PasswordAuthentication/c\PasswordAuthentication no' -e '/ChallengeResponseAuthentication/c\ChallengeResponseAuthentication no' /etc/ssh/sshd_config`
* Set ssh port `sed -i -e '/Port 22/c\Port <PortNr>' /etc/ssh/sshd_config`