Added CT's Duplicati and Vouch-Proxy
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -17,3 +17,4 @@ CT-Files/mailbackup/MailBackup-sys
|
|||||||
CT-Files/elkarbackupDEB/rsnapshot.deb
|
CT-Files/elkarbackupDEB/rsnapshot.deb
|
||||||
CT-Files/elkarbackupALP/Elkarbackup-installed
|
CT-Files/elkarbackupALP/Elkarbackup-installed
|
||||||
CT-Files/mysql/phpmyadminVersion
|
CT-Files/mysql/phpmyadminVersion
|
||||||
|
CT-Files/duplicati/duplicati-installed
|
||||||
@@ -361,6 +361,13 @@ files:
|
|||||||
variants:
|
variants:
|
||||||
- heimdall
|
- heimdall
|
||||||
|
|
||||||
|
#FileForVouchproxy
|
||||||
|
- path: /opt/Setup
|
||||||
|
generator: copy
|
||||||
|
source: CT-Files/vouchproxy
|
||||||
|
variants:
|
||||||
|
- vouchproxy
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
manager: apk
|
manager: apk
|
||||||
update: true
|
update: true
|
||||||
@@ -563,6 +570,13 @@ packages:
|
|||||||
variants:
|
variants:
|
||||||
- heimdall
|
- heimdall
|
||||||
|
|
||||||
|
#PKGS for Vouchproxy
|
||||||
|
- packages:
|
||||||
|
- vouch-proxy
|
||||||
|
action: install
|
||||||
|
variants:
|
||||||
|
- vouchproxy
|
||||||
|
|
||||||
repositories:
|
repositories:
|
||||||
- name: /etc/apk/repositories
|
- name: /etc/apk/repositories
|
||||||
url: |-
|
url: |-
|
||||||
@@ -653,6 +667,7 @@ actions:
|
|||||||
- mailbackup
|
- mailbackup
|
||||||
- elkarbackupALP
|
- elkarbackupALP
|
||||||
- heimdall
|
- heimdall
|
||||||
|
- vouchproxy
|
||||||
|
|
||||||
# Enable service for iscsi CT
|
# Enable service for iscsi CT
|
||||||
- trigger: post-files
|
- trigger: post-files
|
||||||
|
|||||||
@@ -994,6 +994,13 @@ files:
|
|||||||
variants:
|
variants:
|
||||||
- nfs
|
- nfs
|
||||||
|
|
||||||
|
#FileForduplicati
|
||||||
|
- path: /opt/Setup
|
||||||
|
generator: copy
|
||||||
|
source: CT-Files/duplicati
|
||||||
|
variants:
|
||||||
|
- duplicati
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
manager: apt
|
manager: apt
|
||||||
update: true
|
update: true
|
||||||
@@ -1018,6 +1025,7 @@ packages:
|
|||||||
- aptcacherng
|
- aptcacherng
|
||||||
- elkarbackupDEB
|
- elkarbackupDEB
|
||||||
- nfs
|
- nfs
|
||||||
|
- duplicati
|
||||||
|
|
||||||
#Https Repo pkgs
|
#Https Repo pkgs
|
||||||
- packages:
|
- packages:
|
||||||
@@ -1037,6 +1045,7 @@ packages:
|
|||||||
- mysql
|
- mysql
|
||||||
- domoticz
|
- domoticz
|
||||||
- nfs
|
- nfs
|
||||||
|
- duplicati
|
||||||
|
|
||||||
#Minimal pkgs
|
#Minimal pkgs
|
||||||
- packages:
|
- packages:
|
||||||
@@ -1282,6 +1291,35 @@ packages:
|
|||||||
variants:
|
variants:
|
||||||
- nfs
|
- nfs
|
||||||
|
|
||||||
|
#Duplicati pkgs
|
||||||
|
- packages:
|
||||||
|
- unzip
|
||||||
|
- mono-runtime
|
||||||
|
- ca-certificates-mono
|
||||||
|
- libmono-2.0-1
|
||||||
|
- libmono-system-configuration-install4.0-cil
|
||||||
|
- libmono-system-core4.0-cil
|
||||||
|
- libmono-system-configuration4.0-cil
|
||||||
|
- libmono-system-data4.0-cil
|
||||||
|
- libmono-system-drawing4.0-cil
|
||||||
|
- libmono-system-net4.0-cil
|
||||||
|
- libmono-system-net-http4.0-cil
|
||||||
|
- libmono-system-net-http-webrequest4.0-cil
|
||||||
|
- libmono-system-numerics4.0-cil
|
||||||
|
- libmono-system-runtime-serialization4.0-cil
|
||||||
|
- libmono-system-servicemodel4.0a-cil
|
||||||
|
- ibmono-system-servicemodel-discovery4.0-cil
|
||||||
|
- libmono-system-serviceprocess4.0-cil
|
||||||
|
- libmono-system-transactions4.0-cil
|
||||||
|
- libmono-system-web4.0-cil
|
||||||
|
- libmono-system-web-services4.0-cil
|
||||||
|
- libmono-system-xml4.0-cil
|
||||||
|
- libmono-microsoft-csharp4.0-cil
|
||||||
|
- libsqlite3-0
|
||||||
|
action: install
|
||||||
|
variants:
|
||||||
|
- duplicati
|
||||||
|
|
||||||
repositories:
|
repositories:
|
||||||
- name: sources.list
|
- name: sources.list
|
||||||
url: |-
|
url: |-
|
||||||
@@ -1360,6 +1398,13 @@ packages:
|
|||||||
variants:
|
variants:
|
||||||
- elkarbackupDEB
|
- elkarbackupDEB
|
||||||
|
|
||||||
|
#Mono Repo
|
||||||
|
- name: mono.list
|
||||||
|
url: |-
|
||||||
|
deb [signed-by=/usr/share/keyrings/mono-archive-keyring.gpg arch=amd64] https://download.mono-project.com/repo/debian stable-buster main
|
||||||
|
variants:
|
||||||
|
- duplicati
|
||||||
|
|
||||||
actions:
|
actions:
|
||||||
- trigger: post-unpack
|
- trigger: post-unpack
|
||||||
action: |-
|
action: |-
|
||||||
@@ -1413,6 +1458,7 @@ actions:
|
|||||||
- aptcacherng
|
- aptcacherng
|
||||||
- elkarbackupDEB
|
- elkarbackupDEB
|
||||||
- nfs
|
- nfs
|
||||||
|
- duplicati
|
||||||
|
|
||||||
- trigger: post-packages
|
- trigger: post-packages
|
||||||
action: |-
|
action: |-
|
||||||
@@ -1525,5 +1571,13 @@ actions:
|
|||||||
variants:
|
variants:
|
||||||
- elkarbackupDEB
|
- elkarbackupDEB
|
||||||
|
|
||||||
|
#Duplicati Repo key
|
||||||
|
- trigger: post-unpack
|
||||||
|
action: |-
|
||||||
|
#!/bin/sh
|
||||||
|
curl "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xa6a19b38d3d831ef" | gpg --dearmor > /usr/share/keyrings/mono-archive-keyring.gpg
|
||||||
|
variants:
|
||||||
|
- duplicati
|
||||||
|
|
||||||
mappings:
|
mappings:
|
||||||
architecture_map: debian
|
architecture_map: debian
|
||||||
4
CT-Files/duplicati/Configs/Duplicati-env
Normal file
4
CT-Files/duplicati/Configs/Duplicati-env
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Settings for duplicati initscript
|
||||||
|
|
||||||
|
# Additional options that are passed to the Daemon.
|
||||||
|
DAEMON_OPTS="--webservice-interface=any --accept-any-ssl-certificate"
|
||||||
13
CT-Files/duplicati/Configs/duplicati.service
Normal file
13
CT-Files/duplicati/Configs/duplicati.service
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Duplicati web-server
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Nice=19
|
||||||
|
IOSchedulingClass=idle
|
||||||
|
EnvironmentFile=-/etc/default/duplicati
|
||||||
|
ExecStart=/usr/bin/mono /opt/duplicati/Duplicati.Server.exe $DAEMON_OPTS
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
17
CT-Files/duplicati/Scripts/Init.sh
Normal file
17
CT-Files/duplicati/Scripts/Init.sh
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#Extract duplicati
|
||||||
|
unzip /opt/Setup/duplicati.zip -d /opt/duplicati
|
||||||
|
#Remove Archive
|
||||||
|
rm /opt/Setup/duplicati.zip
|
||||||
|
#Install updates-cript
|
||||||
|
mv /opt/Setup/Scripts/UpdateDuplicati.sh /opt/UpdateDuplicati.sh
|
||||||
|
#Move configuration inplace
|
||||||
|
mv /opt/Setup/duplicati-installed /opt/Duplicati-installed
|
||||||
|
mv /opt/Setup/Configs/Duplicati-env /etc/default/duplicati
|
||||||
|
#Installing and enabling service
|
||||||
|
mv /opt/Setup/Configs/duplicati.service /lib/systemd/system/duplicati.service
|
||||||
|
chmod +x /lib/systemd/system/duplicati.service
|
||||||
|
ln -s /lib/systemd/system/duplicati.service /etc/systemd/system/multi-user.target.wants/duplicati.service
|
||||||
|
#Fix SSL sert
|
||||||
|
/usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt
|
||||||
|
update-ca-certificates
|
||||||
20
CT-Files/duplicati/Scripts/UpdateDuplicati.sh
Normal file
20
CT-Files/duplicati/Scripts/UpdateDuplicati.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#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)
|
||||||
|
|
||||||
|
#Compare versions to check for update
|
||||||
|
if [ "$NewDuplicatiVer" = "$(cat /opt/Duplicati-installed)" ] ; then
|
||||||
|
echo 'Duplicati up-to-date'
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo "Updater Disabled, Newer versions not compatible"
|
||||||
|
exit 123
|
||||||
|
systemctl stop duplicati
|
||||||
|
rm -rf /opt/duplicati.bck
|
||||||
|
mv /opt/duplicati /opt/duplicati.bck
|
||||||
|
echo 'Updating Duplicati'
|
||||||
|
curl -L --retry 7 --retry-delay 5 $(curl -s https://api.github.com/repos/duplicati/duplicati/releases/tags/"$NewDuplicatiVer" | grep browser_download_url | grep .zip |grep -v signatures | sed -e s#^.*https#https# | tr -d \") -o /tmp/duplicati.zip
|
||||||
|
unzip /tmp/duplicati.zip -d /opt/duplicati
|
||||||
|
systemctl start duplicati
|
||||||
|
echo $NewDuplicatiVer > "/opt/Duplicati-installed"
|
||||||
|
fi
|
||||||
21
CT-Files/vouchproxy/Scripts/AddOne.sh
Normal file
21
CT-Files/vouchproxy/Scripts/AddOne.sh
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/ash
|
||||||
|
|
||||||
|
#Get and update ID
|
||||||
|
if [ ! -f "/opt/VouchTemplates/.vouchID" ]; then ID=0; else source /opt/VouchTemplates/.vouchID; fi
|
||||||
|
if [ -z ${ID+x} ]; then ID=0; fi
|
||||||
|
ID=$(($ID+1))
|
||||||
|
echo "ID=$ID" > /opt/VouchTemplates/.vouchID
|
||||||
|
|
||||||
|
#Settign up config
|
||||||
|
mkdir "/etc/vouch-proxy$ID"
|
||||||
|
cp -r /usr/share/webapps/vouch-proxy "/usr/share/webapps/vouch-proxy$ID"
|
||||||
|
rm "/usr/share/webapps/vouch-proxy$ID/config"
|
||||||
|
ln -s "/etc/vouch-proxy$ID" "/usr/share/webapps/vouch-proxy$ID/config"
|
||||||
|
cp /opt/VouchTemplates/Vouch-Config "/etc/vouch-proxy$ID/config.yml"
|
||||||
|
sed -i "s/VID/$ID/" "/etc/vouch-proxy$ID/config.yml"
|
||||||
|
|
||||||
|
#Setting up service
|
||||||
|
cp /opt/VouchTemplates/Vouch-Service "/etc/init.d/vouch-proxy$ID"
|
||||||
|
sed -i "s/VID/$ID/" "/etc/init.d/vouch-proxy$ID"
|
||||||
|
chmod +x "/etc/init.d/vouch-proxy$ID"
|
||||||
|
rc-update add "vouch-proxy$ID"
|
||||||
5
CT-Files/vouchproxy/Scripts/init.sh
Normal file
5
CT-Files/vouchproxy/Scripts/init.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/ash
|
||||||
|
rc-update add vouch-proxy
|
||||||
|
mv /opt/Setup/Templates /opt/VouchTemplates
|
||||||
|
touch /opt/VouchTemplates/.vouchID
|
||||||
|
mv /opt/Setup/Scripts/AddOne.sh /opt/AddVouchInstance.sh
|
||||||
8
CT-Files/vouchproxy/Templates/Vouch-Config
Normal file
8
CT-Files/vouchproxy/Templates/Vouch-Config
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# vouch config
|
||||||
|
# Bare minimum to get vouch running on another port
|
||||||
|
|
||||||
|
vouch:
|
||||||
|
# logLevel: debug
|
||||||
|
logLevel: info
|
||||||
|
port: 909VID
|
||||||
|
# Insert further config here
|
||||||
23
CT-Files/vouchproxy/Templates/Vouch-Service
Normal file
23
CT-Files/vouchproxy/Templates/Vouch-Service
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
: ${command_user:="vouch"}
|
||||||
|
: ${command_group:="vouch"}
|
||||||
|
: ${cfgfile:="/etc/vouch-proxyVID/config.yml"}
|
||||||
|
|
||||||
|
name="Vouch Proxy VID"
|
||||||
|
command="/usr/sbin/vouch-proxy"
|
||||||
|
command_background="yes"
|
||||||
|
pidfile="/run/vouch-proxy/$RC_SVCNAME.pid"
|
||||||
|
start_stop_daemon_args="--user $command_user --group $command_group -1 /var/log/vouch-proxy/vouch-proxyVID.log"
|
||||||
|
required_files="$cfgfile"
|
||||||
|
export VOUCH_ROOT="/usr/share/webapps/vouch-proxyVID"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
use net
|
||||||
|
after firewall
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
checkpath -d -m 0755 -o $command_user:$command_group ${pidfile%/*}
|
||||||
|
checkpath -d -m 0755 -o $command_user:$command_group /var/log/vouch-proxy
|
||||||
|
}
|
||||||
16
Readme.md
16
Readme.md
@@ -34,6 +34,7 @@ This can be done on a Minimal debian CT (make sure to enable nesting) on the new
|
|||||||
| x2go | Debian | Remote xfce desktop accessable via X2go |
|
| x2go | Debian | Remote xfce desktop accessable via X2go |
|
||||||
| aptcacherng | Debian | Caching server for linux packages |
|
| aptcacherng | Debian | Caching server for linux packages |
|
||||||
| nfs | Debian | NFS server |
|
| nfs | Debian | NFS server |
|
||||||
|
| duplicati | Debian | Duplicati backup software |
|
||||||
| gitea | Alpine | Gitea server |
|
| gitea | Alpine | Gitea server |
|
||||||
| nginx | Alpine | Nginx server for reverse-proxy use |
|
| nginx | Alpine | Nginx server for reverse-proxy use |
|
||||||
| ddns | Alpine | DDNS client configured for OVH/OVH-Cloud |
|
| ddns | Alpine | DDNS client configured for OVH/OVH-Cloud |
|
||||||
@@ -47,6 +48,7 @@ This can be done on a Minimal debian CT (make sure to enable nesting) on the new
|
|||||||
| hass | Alpine | HomeAssistant instance with HACS and mysql support |
|
| hass | Alpine | HomeAssistant instance with HACS and mysql support |
|
||||||
| mailbackup | Alpine | Contains mail archive tools (MailBackup-sys) |
|
| mailbackup | Alpine | Contains mail archive tools (MailBackup-sys) |
|
||||||
| heimdall | Alpine | Heimdall, A application dashboard/launcher |
|
| heimdall | Alpine | Heimdall, A application dashboard/launcher |
|
||||||
|
| vouchproxy | Alpine | Vouch-proxy, A SSO solution for Nginx |
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
**Begin original list**
|
**Begin original list**
|
||||||
@@ -227,10 +229,20 @@ lxc.mount.entry: /dev/ttyACM-Zwave dev/ttyACM-Zwave none bind,optional,create=fi
|
|||||||
* Webmin available on http://`<ip/hostname>`
|
* Webmin available on http://`<ip/hostname>`
|
||||||
* NFS server Available
|
* NFS server Available
|
||||||
|
|
||||||
|
## duplicati
|
||||||
|
* Available on http://`<ip>`:8200
|
||||||
|
|
||||||
## mailbackup
|
## mailbackup
|
||||||
* Info html page available on http://`<ip>`:80
|
* Info html page available on http://`<ip>`:80
|
||||||
* Add user/storage space by running `ash /opt/AddMailBox.sh`
|
* Add user/storage space by running `ash /opt/AddMailBox.sh`
|
||||||
|
|
||||||
|
## heimdall
|
||||||
|
* available on http://`<ip>`:80
|
||||||
|
|
||||||
|
## vouchproxy
|
||||||
|
* Default port 9090
|
||||||
|
* A script to setup another instance is located here: `/opt/AddVouchInstance.sh`
|
||||||
|
|
||||||
## elkarbackup
|
## elkarbackup
|
||||||
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`
|
||||||
@@ -260,6 +272,10 @@ exit
|
|||||||
```
|
```
|
||||||
lvcreate --name <name> --size <VolumeSize>G <PoolName>
|
lvcreate --name <name> --size <VolumeSize>G <PoolName>
|
||||||
```
|
```
|
||||||
|
* Create LVM-Thin Volume
|
||||||
|
```
|
||||||
|
lvcreate --thin -n <name> -V <VolumeSize>G <poolName>/<ThinpoolName>
|
||||||
|
```
|
||||||
* Create ZFS Volume (Available @ /dev/`<poolName>`/`<VolumeName>`)
|
* Create ZFS Volume (Available @ /dev/`<poolName>`/`<VolumeName>`)
|
||||||
```
|
```
|
||||||
zfs create -o volblocksize=32k -V <VolumeSize>G <poolName>/<VolumeName>
|
zfs create -o volblocksize=32k -V <VolumeSize>G <poolName>/<VolumeName>
|
||||||
|
|||||||
@@ -51,3 +51,10 @@ GetResource elkarbackupDEB rsnapshot.deb http://ftp.debian.org/debian/pool/main/
|
|||||||
|
|
||||||
GetGithubRelease elkarbackupALP elkarbackup elkarbackup/elkarbackup Elkarbackup-installed
|
GetGithubRelease elkarbackupALP elkarbackup elkarbackup/elkarbackup Elkarbackup-installed
|
||||||
GetResource elkarbackupALP elkb.tar.gz https://github.com/elkarbackup/elkarbackup/archive/refs/tags/$elkarbackupVer.tar.gz -o /tmp/
|
GetResource elkarbackupALP elkb.tar.gz https://github.com/elkarbackup/elkarbackup/archive/refs/tags/$elkarbackupVer.tar.gz -o /tmp/
|
||||||
|
|
||||||
|
##Duplicate get latest (non working version)
|
||||||
|
#duplicatiVer=$(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 (Tested working)
|
||||||
|
duplicatiVer="v2.0.5.1-2.0.5.1_beta_2020-01-18"
|
||||||
|
echo $duplicatiVer > "CT-Files/duplicati/duplicati-installed"
|
||||||
|
GetResource duplicati duplicati.zip $(curl -s https://api.github.com/repos/duplicati/duplicati/releases/tags/"$duplicatiVer" | grep browser_download_url | grep .zip |grep -v signatures | sed -e s#^.*https#https# | tr -d \")
|
||||||
Reference in New Issue
Block a user