diff --git a/README.md b/README.md index 3ed2b97..287bd0f 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 @@ -23,10 +23,10 @@ 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`). +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 diff --git a/debian-priv.sh b/debian-priv.sh index 881a310..0893b2e 100644 --- a/debian-priv.sh +++ b/debian-priv.sh @@ -5,12 +5,14 @@ # (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 -# Set Timezone -ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime +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 apt update DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq dist-upgrade diff --git a/install.sh b/install.sh index fabcdee..c528bb1 100644 --- a/install.sh +++ b/install.sh @@ -106,7 +106,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 -features nesting=$LXC_NESTING -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 -features nesting=$LXC_NESTING -net0 name=eth0,bridge=$LXC_BRIDGE,firewall=1,gw=$LXC_GW,ip=$LXC_IP,type=veth$VLAN; sleep 2 if [ $LXC_MP -gt 0 ]; then diff --git a/mailpiler.sh b/mailpiler.sh index fb7a90f..ca58533 100644 --- a/mailpiler.sh +++ b/mailpiler.sh @@ -5,13 +5,14 @@ # (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 -# Set Timezone -ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime +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 HOSTNAME=$(hostname -f) diff --git a/matrix.sh b/matrix.sh index 0c5dccc..c2bdd62 100644 --- a/matrix.sh +++ b/matrix.sh @@ -5,13 +5,14 @@ # (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 -# Set Timezone -ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime +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 MRX_PKE=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) diff --git a/zamba.conf b/zamba.conf index a089c57..6f9e8c4 100644 --- a/zamba.conf +++ b/zamba.conf @@ -70,8 +70,7 @@ LXC_TOOLSET="vim htop net-tools dnsutils mc sysstat lsb-release curl git gnupg2 LXC_TIMEZONE="Europe/Berlin" # Define system language on LXC container (locales) -# This parameter is not used yet, but will be integrated in future releases. -LXC_LOCALE="de_DE.utf8" +LXC_LOCALE=de_DE.UTF-8 ############### Zamba-Server-Section ############### diff --git a/zmb-ad.sh b/zmb-ad.sh index 805dfd2..e502e8d 100644 --- a/zmb-ad.sh +++ b/zmb-ad.sh @@ -5,18 +5,19 @@ # (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 -# 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! diff --git a/zmb-member.sh b/zmb-member.sh index e784ea4..5a880b4 100644 --- a/zmb-member.sh +++ b/zmb-member.sh @@ -5,13 +5,14 @@ # (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 -# Set Timezone -ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime +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 apt update DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq dist-upgrade diff --git a/zmb-standalone.sh b/zmb-standalone.sh index 70fd9a8..85ab941 100644 --- a/zmb-standalone.sh +++ b/zmb-standalone.sh @@ -5,13 +5,14 @@ # (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 -# Set Timezone -ln -sf /usr/share/zoneinfo/$LXC_TIMEZONE /etc/localtime +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 apt update DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq dist-upgrade