From a30eea12531512ac32a92d765b8e83376aeeb712 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Sat, 17 Apr 2021 09:31:05 +0200 Subject: [PATCH 01/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a99f683..fd0db16 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Zamba LXC Toolbox ## About -Zamba LXC Toolbox is a collection of scripts to easily install LXC containers with preconfigured services on Proxmox with ZFS. +Zamba LXC Toolbox is a collection of scripts to easily install Debian LXC containers with preconfigured services on Proxmox with ZFS. The main feature is `Zamba`, the fusion of ZFS and Samba in three different flavours (standalone, active directory dc or active directory member), preconfigured to access ZFS snapshots by "Windows Previous Versions" to easily recover encrypted by ransomware files, accidently deleted files or just to revert changes. The package also provides LXC container installers for `mailpiler`, `matrix-synapse` + `element-web` and more services will follow in future releases. ### Requirements From 30f967d1a109626b6889a65b3c06c4d9b23eba99 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Sat, 17 Apr 2021 22:20:00 +0200 Subject: [PATCH 02/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fd0db16..81913aa 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ apt -y install git ### Clone this Repository ```bash git clone https://github.com/bashclub/zamba-lxc-toolbox -cd zamba +cd zamba-lxc-toolbox ``` ### Configuration To fit your requirements, please edit the file `zamba.conf` with your favourite test editor (e.g. `vim` or `nano`). From 8c605510a48b1b3747aa35f16e4f2aa4c84fefb8 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Sat, 17 Apr 2021 22:24:22 +0200 Subject: [PATCH 03/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 81913aa..eb4f460 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ git clone https://github.com/bashclub/zamba-lxc-toolbox cd zamba-lxc-toolbox ``` ### Configuration -To fit your requirements, please edit the file `zamba.conf` with your favourite test editor (e.g. `vim` or `nano`). +To fit your requirements, please edit the file `zamba.conf` with your favourite text editor (e.g. `vim` or `nano`). The required adjustments are in the LXC container section and in the section for the service you want to launch. For further information about the config variables, have a look at [zamba.conf.md](zamba.conf.md) ### Installation From fbb4d506f0c42d7096fec63588a9d471e70f00d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Pannenb=C3=A4cker?= Date: Tue, 20 Apr 2021 18:52:26 +0200 Subject: [PATCH 04/17] $LXC_TIMEZONE instead of fixed Europe/Berlin pct set ... change to use variable $LXC_TIMEZONE instead of fixed "Europe/Berlin". P.S.: Is timezone parameter required when creating an LXC container or can it be left out entirely? --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 58e2f33..d23a800 100644 --- a/install.sh +++ b/install.sh @@ -53,7 +53,7 @@ else VLAN="" fi # Reconfigure conatiner -pct set $LXC_NBR -memory $LXC_MEM -swap $LXC_SWAP -hostname $LXC_HOSTNAME \-nameserver $LXC_DNS -searchdomain $LXC_DOMAIN -onboot 1 -timezone Europe/Berlin -net0 name=eth0,bridge=$LXC_BRIDGE,firewall=1,gw=$LXC_GW,ip=$LXC_IP,type=veth$VLAN; +pct set $LXC_NBR -memory $LXC_MEM -swap $LXC_SWAP -hostname $LXC_HOSTNAME \-nameserver $LXC_DNS -searchdomain $LXC_DOMAIN -onboot 1 -timezone $LXC_TIMEZONE -net0 name=eth0,bridge=$LXC_BRIDGE,firewall=1,gw=$LXC_GW,ip=$LXC_IP,type=veth$VLAN; sleep 2; PS3="Select the Server-Function: " From ea60e768dedfefcae5a8db5c4ebeadf8bc91fa69 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 21:48:21 +0200 Subject: [PATCH 05/17] Changed setting locales #20 --- just_lxc.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/just_lxc.sh b/just_lxc.sh index 881a310..72b6b6d 100644 --- a/just_lxc.sh +++ b/just_lxc.sh @@ -5,10 +5,15 @@ # (C) 2021 Script design and prototype by Markus Helmke # (C) 2021 Script rework and documentation by Thorsten Spille -dpkg-reconfigure locales - source /root/zamba.conf +sed -i "s|# $LXC_LOCALE|$LXC_LOCALE|" /etc/locale.gen +cat << EOF > /etc/default/locale +LANG="$LXC_LOCALE" +LANGUAGE=$LXC_LOCALE +EOF +locale-gen $LXC_LOCALE + # Set Timezone ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime From bc633949345f1245751ee886fc5c256a8b5f1a55 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 21:49:21 +0200 Subject: [PATCH 06/17] Changed setting locales #20 --- mailpiler.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mailpiler.sh b/mailpiler.sh index fb7a90f..d4f9cf3 100644 --- a/mailpiler.sh +++ b/mailpiler.sh @@ -5,11 +5,15 @@ # (C) 2021 Script design and prototype by Markus Helmke # (C) 2021 Script rework and documentation by Thorsten Spille -# configure system language -dpkg-reconfigure locales - source /root/zamba.conf +sed -i "s|# $LXC_LOCALE|$LXC_LOCALE|" /etc/locale.gen +cat << EOF > /etc/default/locale +LANG="$LXC_LOCALE" +LANGUAGE=$LXC_LOCALE +EOF +locale-gen $LXC_LOCALE + # Set Timezone ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime From 7d8fe9a639d1ce4c1ebabbf3209113ecb891e382 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 21:50:24 +0200 Subject: [PATCH 07/17] Changed setting locales #20 --- matrix.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/matrix.sh b/matrix.sh index 0c5dccc..f83c2e7 100644 --- a/matrix.sh +++ b/matrix.sh @@ -5,11 +5,15 @@ # (C) 2021 Script design and prototype by Markus Helmke # (C) 2021 Script rework and documentation by Thorsten Spille -# configure system language -dpkg-reconfigure locales - source /root/zamba.conf +sed -i "s|# $LXC_LOCALE|$LXC_LOCALE|" /etc/locale.gen +cat << EOF > /etc/default/locale +LANG="$LXC_LOCALE" +LANGUAGE=$LXC_LOCALE +EOF +locale-gen $LXC_LOCALE + # Set Timezone ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime From bfcb4d6c840b577314f1b5e6b2e3be727e34605f Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 21:51:13 +0200 Subject: [PATCH 08/17] Changed setting locale #20 --- zmb-ad.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zmb-ad.sh b/zmb-ad.sh index 805dfd2..7d77157 100644 --- a/zmb-ad.sh +++ b/zmb-ad.sh @@ -5,11 +5,15 @@ # (C) 2021 Script design and prototype by Markus Helmke # (C) 2021 Script rework and documentation by Thorsten Spille -# configure system language -dpkg-reconfigure locales - source /root/zamba.conf +sed -i "s|# $LXC_LOCALE|$LXC_LOCALE|" /etc/locale.gen +cat << EOF > /etc/default/locale +LANG="$LXC_LOCALE" +LANGUAGE=$LXC_LOCALE +EOF +locale-gen $LXC_LOCALE + if [[ $ZMB_DNS_BACKEND == "BIND9_DLZ" ]]; then BINDNINE=bind9 fi From f4a8d4a4647fbc58f01aa32c24059c9463f41be3 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 21:51:56 +0200 Subject: [PATCH 09/17] Changed setting locale #20 --- zmb-member.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zmb-member.sh b/zmb-member.sh index e784ea4..bbe7158 100644 --- a/zmb-member.sh +++ b/zmb-member.sh @@ -5,11 +5,15 @@ # (C) 2021 Script design and prototype by Markus Helmke # (C) 2021 Script rework and documentation by Thorsten Spille -# configure system language -dpkg-reconfigure locales - source /root/zamba.conf +sed -i "s|# $LXC_LOCALE|$LXC_LOCALE|" /etc/locale.gen +cat << EOF > /etc/default/locale +LANG="$LXC_LOCALE" +LANGUAGE=$LXC_LOCALE +EOF +locale-gen $LXC_LOCALE + # Set Timezone ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime From 4978c882083e870b07e308a2ec457f989889f63d Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 21:52:43 +0200 Subject: [PATCH 10/17] Changed setting local #20 --- zmb-standalone.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zmb-standalone.sh b/zmb-standalone.sh index 70fd9a8..d011233 100644 --- a/zmb-standalone.sh +++ b/zmb-standalone.sh @@ -5,11 +5,15 @@ # (C) 2021 Script design and prototype by Markus Helmke # (C) 2021 Script rework and documentation by Thorsten Spille -# configure system language -dpkg-reconfigure locales - source /root/zamba.conf +sed -i "s|# $LXC_LOCALE|$LXC_LOCALE|" /etc/locale.gen +cat << EOF > /etc/default/locale +LANG="$LXC_LOCALE" +LANGUAGE=$LXC_LOCALE +EOF +locale-gen $LXC_LOCALE + # Set Timezone ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime From a52b0ad5f61b33e688ae171e6936a7d5743a1a1f Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 21:57:30 +0200 Subject: [PATCH 11/17] Changed default value of LXC_LOCALE variable #20 --- zamba.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zamba.conf b/zamba.conf index 894b599..079c03f 100644 --- a/zamba.conf +++ b/zamba.conf @@ -67,7 +67,7 @@ LXC_TOOLSET="vim htop net-tools dnsutils mc sysstat lsb-release curl git" LXC_TIMEZONE="Europe/Berlin" # Define system language on LXC container (locales) -LXC_LOCALE="de_DE.utf8" +LXC_LOCALE=de_DE.UTF-8 ############### Zamba-Server-Section ############### From 9898957356be87148831118ef7aa71b2a5f5a452 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 22:07:39 +0200 Subject: [PATCH 12/17] Removed timezone setting Timezone is already set in `install.sh` #21 --- just_lxc.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/just_lxc.sh b/just_lxc.sh index 72b6b6d..0893b2e 100644 --- a/just_lxc.sh +++ b/just_lxc.sh @@ -14,9 +14,6 @@ LANGUAGE=$LXC_LOCALE EOF locale-gen $LXC_LOCALE -# Set Timezone -ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime - apt update DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq dist-upgrade DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" $LXC_TOOLSET From 3b109f6c1e0a43232bfa94bc5d504c34cf7cd026 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 22:08:13 +0200 Subject: [PATCH 13/17] Removed timezone setting Timezone is already set in `install.sh` #21 --- mailpiler.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/mailpiler.sh b/mailpiler.sh index d4f9cf3..ca58533 100644 --- a/mailpiler.sh +++ b/mailpiler.sh @@ -14,9 +14,6 @@ LANGUAGE=$LXC_LOCALE EOF locale-gen $LXC_LOCALE -# Set Timezone -ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime - HOSTNAME=$(hostname -f) echo "Ensure your Hostname is set to your Piler FQDN!" From edafaefcf15f397c9d11a6545007bea9790b7866 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 22:08:46 +0200 Subject: [PATCH 14/17] Removed timezone setting Timezone is already set in `install.sh` #21 --- matrix.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/matrix.sh b/matrix.sh index f83c2e7..c2bdd62 100644 --- a/matrix.sh +++ b/matrix.sh @@ -14,9 +14,6 @@ LANGUAGE=$LXC_LOCALE EOF locale-gen $LXC_LOCALE -# Set Timezone -ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime - MRX_PKE=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) ELE_DBNAME="synapse_db" From 4eb6802ec8be9f54b601b71122086496812a408d Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 22:09:22 +0200 Subject: [PATCH 15/17] Removed timezone setting Timezone is already set in `install.sh` #21 --- zmb-ad.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/zmb-ad.sh b/zmb-ad.sh index 7d77157..e502e8d 100644 --- a/zmb-ad.sh +++ b/zmb-ad.sh @@ -18,9 +18,6 @@ if [[ $ZMB_DNS_BACKEND == "BIND9_DLZ" ]]; then BINDNINE=bind9 fi -# Set Timezone -ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime - ## configure ntp cat << EOF > /etc/ntp.conf # Local clock. Note that is not the "localhost" address! From 10e7f16fac8d7d961f7fdc66a9c871984c109b4b Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 22:09:57 +0200 Subject: [PATCH 16/17] Removed timezone setting Timezone is already set in `install.sh` #21 --- zmb-member.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/zmb-member.sh b/zmb-member.sh index bbe7158..5a880b4 100644 --- a/zmb-member.sh +++ b/zmb-member.sh @@ -14,9 +14,6 @@ LANGUAGE=$LXC_LOCALE EOF locale-gen $LXC_LOCALE -# Set Timezone -ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime - apt update DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq dist-upgrade DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" $LXC_TOOLSET acl samba winbind libpam-winbind libnss-winbind krb5-user krb5-config samba-dsdb-modules samba-vfs-modules From 450eb654b20b39bc4fb774f54bc42f3dcbeeb60e Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 20 Apr 2021 22:10:26 +0200 Subject: [PATCH 17/17] Removed timezone setting Timezone is already set in `install.sh` #21 --- zmb-standalone.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/zmb-standalone.sh b/zmb-standalone.sh index d011233..85ab941 100644 --- a/zmb-standalone.sh +++ b/zmb-standalone.sh @@ -14,9 +14,6 @@ LANGUAGE=$LXC_LOCALE EOF locale-gen $LXC_LOCALE -# Set Timezone -ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime - apt update DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq dist-upgrade DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" $LXC_TOOLSET acl samba samba-dsdb-modules samba-vfs-modules