From cbefdf3c806e7795b0572d07c79d87c1e684833f Mon Sep 17 00:00:00 2001 From: Chriz Date: Fri, 12 Aug 2022 12:44:18 +0200 Subject: [PATCH 1/9] Create updatenc place file in /etc/cron.daily chmod +x /etc/cron.daily/updatenc --- updatenc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 updatenc diff --git a/updatenc b/updatenc new file mode 100644 index 0000000..28fe2ae --- /dev/null +++ b/updatenc @@ -0,0 +1,23 @@ +sudo -u www-data php8.0 /var/www/nextcloud/updater/updater.phar --no-backup --no-interaction + +sudo -u www-data php8.0 /var/www/nextcloud/occ status +sudo -u www-data php8.0 /var/www/nextcloud/occ -V + +sudo -u www-data php8.0 /var/www/nextcloud/occ db:add-missing-primary-keys + +sudo -u www-data php8.0 /var/www/nextcloud/occ db:add-missing-indices + +sudo -u www-data php8.0 /var/www/nextcloud/occ db:add-missing-columns + +sudo -u www-data php8.0 /var/www/nextcloud/occ db:convert-filecache-bigint + +#sudo -u www-data php8.0 /var/www/nextcloud/occ files:scan --all +sudo -u www-data php8.0 /var/www/nextcloud/occ files:scan-app-data +sudo -u www-data php8.0 /var/www/nextcloud/occ app:update --all + +sudo -u www-data php8.0 /var/www/nextcloud/occ upgrade + +/usr/sbin/service php8.0-fpm restart +/usr/sbin/service nginx restart + +sudo -u www-data php8.0 /var/www/nextcloud/occ -V From 51745cc1817132910ea3c801896e04b34b43b007 Mon Sep 17 00:00:00 2001 From: Chriz Date: Fri, 12 Aug 2022 12:46:16 +0200 Subject: [PATCH 2/9] Update updatenc --- updatenc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/updatenc b/updatenc index 28fe2ae..3b649d5 100644 --- a/updatenc +++ b/updatenc @@ -1,3 +1,8 @@ +#!/bin/sh + + +#place in /etc/cron.daily and make executable with chmod +x /etc/cron.daily/updatenc + sudo -u www-data php8.0 /var/www/nextcloud/updater/updater.phar --no-backup --no-interaction sudo -u www-data php8.0 /var/www/nextcloud/occ status From 7dc9ccec6e91dbe19e37a340af5046a60ca5767f Mon Sep 17 00:00:00 2001 From: Chriz Date: Fri, 12 Aug 2022 12:46:38 +0200 Subject: [PATCH 3/9] Update updatenc --- updatenc | 1 - 1 file changed, 1 deletion(-) diff --git a/updatenc b/updatenc index 3b649d5..3309f07 100644 --- a/updatenc +++ b/updatenc @@ -16,7 +16,6 @@ sudo -u www-data php8.0 /var/www/nextcloud/occ db:add-missing-columns sudo -u www-data php8.0 /var/www/nextcloud/occ db:convert-filecache-bigint -#sudo -u www-data php8.0 /var/www/nextcloud/occ files:scan --all sudo -u www-data php8.0 /var/www/nextcloud/occ files:scan-app-data sudo -u www-data php8.0 /var/www/nextcloud/occ app:update --all From f99d1a2c660e38423376957fae7917ec8e6006b7 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 8 Nov 2022 23:40:12 +0100 Subject: [PATCH 4/9] Rework Nextcloud update script --- updatenc | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/updatenc b/updatenc index 3309f07..9e54c31 100644 --- a/updatenc +++ b/updatenc @@ -1,27 +1,17 @@ -#!/bin/sh +#!/bin/bash +# +# Update nextcloud +# place in /etc/cron.daily and make executable with chmod +x /etc/cron.daily/updatenc +user=www-data +phpversion=php8.0 +path=/var/www/nextcloud +alias ncc="sudo -u $user $phpversion $path/occ" +alias updater="sudo -u $user $phpversion $path/updater/updater.phar" -#place in /etc/cron.daily and make executable with chmod +x /etc/cron.daily/updatenc +updater --no-backup --no-interaction -sudo -u www-data php8.0 /var/www/nextcloud/updater/updater.phar --no-backup --no-interaction - -sudo -u www-data php8.0 /var/www/nextcloud/occ status -sudo -u www-data php8.0 /var/www/nextcloud/occ -V - -sudo -u www-data php8.0 /var/www/nextcloud/occ db:add-missing-primary-keys - -sudo -u www-data php8.0 /var/www/nextcloud/occ db:add-missing-indices - -sudo -u www-data php8.0 /var/www/nextcloud/occ db:add-missing-columns - -sudo -u www-data php8.0 /var/www/nextcloud/occ db:convert-filecache-bigint - -sudo -u www-data php8.0 /var/www/nextcloud/occ files:scan-app-data -sudo -u www-data php8.0 /var/www/nextcloud/occ app:update --all - -sudo -u www-data php8.0 /var/www/nextcloud/occ upgrade - -/usr/sbin/service php8.0-fpm restart -/usr/sbin/service nginx restart - -sudo -u www-data php8.0 /var/www/nextcloud/occ -V +subcommands=("db:add-missing-primary-keys" "db:add-missing-indices" "db:add-missing-columns" "db:convert-filecache-bigint" "files:scan-app-data" "--quiet --all app:update" "upgrade") +for cmd in ${subcommands[@]}; do + ncc -n $cmd +done From 46b8b9990d388b480737ee4ed7daf825f51093c3 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Tue, 8 Nov 2022 23:42:39 +0100 Subject: [PATCH 5/9] move nextcloud updater --- updatenc => scripts/nextcloud-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename updatenc => scripts/nextcloud-update (94%) diff --git a/updatenc b/scripts/nextcloud-update similarity index 94% rename from updatenc rename to scripts/nextcloud-update index 9e54c31..33e4a1b 100644 --- a/updatenc +++ b/scripts/nextcloud-update @@ -1,7 +1,7 @@ #!/bin/bash # # Update nextcloud -# place in /etc/cron.daily and make executable with chmod +x /etc/cron.daily/updatenc +# place in /etc/cron.daily and make executable with chmod +x /etc/cron.daily/nextcloud-update user=www-data phpversion=php8.0 path=/var/www/nextcloud From 09acbc522da76b3ff6ac2becffa861fbfc024d85 Mon Sep 17 00:00:00 2001 From: Chriz Date: Sun, 25 Dec 2022 22:33:28 +0100 Subject: [PATCH 6/9] Create zamba.conf To avoid copying the zamba.conf.example and safe time --- conf/zamba.conf | 149 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 conf/zamba.conf diff --git a/conf/zamba.conf b/conf/zamba.conf new file mode 100644 index 0000000..f6a0150 --- /dev/null +++ b/conf/zamba.conf @@ -0,0 +1,149 @@ +#!/bin/bash + +# This ist the Zamba main configuration file. +# Please adjust the settings to your needs before running the installer. + +# Authors: +# (C) 2021 Idea an concept by Christian Zengel +# (C) 2021 Script design and prototype by Markus Helmke +# (C) 2021 Script rework and documentation by Thorsten Spille + + +############### Linux Container Section ############### + +# Defines the Proxmox storage where your LXC container template are stored (default: local) +LXC_TEMPLATE_STORAGE="local" + +# Defines the size in GB of the LXC container's root filesystem (default: 32) +# Depending on your environment, you should consider increasing the size for use of `mailpiler` or `matrix`. +LXC_ROOTFS_SIZE="32" +# Defines the Proxmox storage where your LXC container's root filesystem will be generated (default: local-zfs) +LXC_ROOTFS_STORAGE="local-zfs" + +# Defines the size in GB your LXC container's filesystem shared by Zamba (AD member & standalone) (default: 100) +LXC_SHAREFS_SIZE="100" +# Defines the Proxmox storage where your LXC container's filesystem shared by Zamba will be generated (default: local-zfs) +LXC_SHAREFS_STORAGE="local-zfs" +# Defines the mountpoint of the filesystem shared by Zamba inside your LXC container (default: tank) +LXC_SHAREFS_MOUNTPOINT="tank" + +# Defines the amount of RAM in MB your LXC container is allowed to use (default: 1024) +LXC_MEM="1024" + +# Defines the amount of swap space in MB your LXC container is allowed to use (default: 1024) +LXC_SWAP="1024" + +# Defines the hostname of your LXC container +LXC_HOSTNAME="${service}" + +# Defines the domain name / search domain of your LXC container +LXC_DOMAIN="zmb.rocks" + +# Enable DHCP on LAN (eth0) - (Obtain an IP address automatically) [true/false] +LXC_DHCP=false + +# Defines the local IP address and subnet of your LXC container in CIDR format +LXC_IP="192.168.100.200/24" + +# Defines the default gateway IP address of your LXC container +LXC_GW="192.168.100.254" + +# Defines the DNS server ip address of your LXC container +# `zmb-ad` used this DNS server for installation, after installation and domain provisioning it will be used as forwarding DNS +# For other services this should be your active directory domain controller (if present, else a DNS server of your choice) +LXC_DNS="192.168.100.254" + +# Defines the network bridge to bind the network adapter of your LXC container +LXC_BRIDGE="vmbr0" + +# Defines the vlan id of the LXC container's network interface, if the network adapter should be connected untagged, just leave the value empty. +LXC_VLAN= + +# Defines the `root` password of your LXC container. Please use 'single quatation marks' to avoid unexpected behaviour. +LXC_PWD='Start!123' + +# Defines an authorized_keys file to push into the LXC container. +# By default the authorized_keys will be inherited from your proxmox host. +LXC_AUTHORIZED_KEY=~/.ssh/authorized_keys + +# Define your (administrative) tools, you always want to have installed into your LXC container +LXC_TOOLSET="vim htop net-tools dnsutils sysstat mc" + +# Define the local timezone of your LXC container (default: Euroe/Berlin) +LXC_TIMEZONE="Europe/Berlin" + +# Define system language on LXC container (locales) +# With this paramater you can generate additional locales, the default language will be inherited from proxmox host. +# en_US.UTF-8 english +# de_DE.UTF-8 german (default) +LXC_LOCALE="de_DE.UTF-8" + +# Set dark background for vim syntax highlighting (0 or 1) +LXC_VIM_BG_DARK=1 + +############### Zamba-Server-Section ############### + +# Defines the REALM for the Active Directory (AD DC, AD member) +ZMB_REALM="ZMB.ROCKS" +# Defines the domain name in your Active Directory or Workgroup (AD DC, AD member, standalone) +ZMB_DOMAIN="ZMB" + +# Defines the name of your domain administrator account (AD DC, AD member, standalone) +ZMB_ADMIN_USER="administrator" +# The admin password for zamba installation. Please use 'single quatation marks' to avoid unexpected behaviour +# `zmb-ad` domain administrator has to meet the password complexity policy, if password is too weak, domain provisioning will fail +ZMB_ADMIN_PASS='Start!123' + +# Defines the name of your Zamba share +ZMB_SHARE="share" + +############### Mailpiler-Section ############### + +# Defines the (public) FQDN of your piler mail archive +PILER_FQDN="mailpiler.zmb.rocks" +# Defines the smarthost for piler mail archive +PILER_SMARTHOST="mail.zmb.rocks" + +############### Matrix-Section ############### + +# Define the FQDN of your Matrix server +MATRIX_FQDN="matrix.zmb.rocks" + +# Define the FQDN for the Element Web virtual host +MATRIX_ELEMENT_FQDN="element.zmb.rocks" + +# Define the administrative user of matrix service +MATRIX_ADMIN_USER="admin" + +# Define the admin password +MATRIX_ADMIN_PASSWORD="Start!123" + +############### Nextcloud-Section ############### + +# Define the FQDN of your Nextcloud server +NEXTCLOUD_FQDN="nextcloud.zmb.rocks" + +# The initial admin-user which will be configured +NEXTCLOUD_ADMIN_USR="zmb-admin" + +# Build a strong password for this user. Username and password will shown at the end of the instalation. +NEXTCLOUD_ADMIN_PWD="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" + +# Defines the data directory, which will be createt under LXC_SHAREFS_MOUNTPOINT +NEXTCLOUD_DATA="nc_data" + +# Defines the trusted reverse proxy, which will enable the detection of source ip to fail2ban +NEXTCLOUD_REVPROX="192.168.100.254" + +############### Check_MK-Section ############### + +# Define the name of your checkmk instance +CMK_INSTANCE=zmbrocks + +# Define the password of user 'cmkadmin' +CMK_ADMIN_PW='Start!123' + +# checkmk edition (raw or free) +# raw = completely free +# free = limited version of the enterprise edition (25 hosts, 1 instance) +CMK_EDITION=raw From 65dd63f0200c2e1ea0a555cfd5cfac6af30f90c5 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Mon, 16 Jan 2023 09:34:10 +0100 Subject: [PATCH 7/9] Change mailpioler version to 1.3.12 --- src/mailpiler/constants-service.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mailpiler/constants-service.conf b/src/mailpiler/constants-service.conf index 91bfc92..c943bf2 100644 --- a/src/mailpiler/constants-service.conf +++ b/src/mailpiler/constants-service.conf @@ -20,8 +20,8 @@ LXC_UNPRIVILEGED="1" LXC_NESTING="1" # Defines the version number of piler mail archive to install (type in exact version number (e.g. 1.3.11) or 'latest') -PILER_VERSION="latest" +PILER_VERSION="1.3.12" # Defines the version of sphinx to install PILER_SPHINX_VERSION="3.3.1" # Defines the php version to install -PILER_PHP_VERSION="7.4" \ No newline at end of file +PILER_PHP_VERSION="7.4" From 76a90cb707e9bf0f36368491746eab90f7d14105 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Thu, 2 Feb 2023 20:00:38 +0100 Subject: [PATCH 8/9] Update constants-service.conf --- src/checkmk/constants-service.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/checkmk/constants-service.conf b/src/checkmk/constants-service.conf index fadd3a9..4659e6f 100644 --- a/src/checkmk/constants-service.conf +++ b/src/checkmk/constants-service.conf @@ -20,6 +20,6 @@ LXC_UNPRIVILEGED="1" LXC_NESTING="1" # checkmk version -CMK_VERSION=2.0.0p23 +CMK_VERSION=2.0.0p33 # build number of the debian package (needs to start with underscore) CMK_BUILD=_0 From ae23a8a4f65eff119765114fa950777ad5b28a19 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Thu, 2 Feb 2023 20:01:21 +0100 Subject: [PATCH 9/9] Delete zamba.conf --- conf/zamba.conf | 149 ------------------------------------------------ 1 file changed, 149 deletions(-) delete mode 100644 conf/zamba.conf diff --git a/conf/zamba.conf b/conf/zamba.conf deleted file mode 100644 index f6a0150..0000000 --- a/conf/zamba.conf +++ /dev/null @@ -1,149 +0,0 @@ -#!/bin/bash - -# This ist the Zamba main configuration file. -# Please adjust the settings to your needs before running the installer. - -# Authors: -# (C) 2021 Idea an concept by Christian Zengel -# (C) 2021 Script design and prototype by Markus Helmke -# (C) 2021 Script rework and documentation by Thorsten Spille - - -############### Linux Container Section ############### - -# Defines the Proxmox storage where your LXC container template are stored (default: local) -LXC_TEMPLATE_STORAGE="local" - -# Defines the size in GB of the LXC container's root filesystem (default: 32) -# Depending on your environment, you should consider increasing the size for use of `mailpiler` or `matrix`. -LXC_ROOTFS_SIZE="32" -# Defines the Proxmox storage where your LXC container's root filesystem will be generated (default: local-zfs) -LXC_ROOTFS_STORAGE="local-zfs" - -# Defines the size in GB your LXC container's filesystem shared by Zamba (AD member & standalone) (default: 100) -LXC_SHAREFS_SIZE="100" -# Defines the Proxmox storage where your LXC container's filesystem shared by Zamba will be generated (default: local-zfs) -LXC_SHAREFS_STORAGE="local-zfs" -# Defines the mountpoint of the filesystem shared by Zamba inside your LXC container (default: tank) -LXC_SHAREFS_MOUNTPOINT="tank" - -# Defines the amount of RAM in MB your LXC container is allowed to use (default: 1024) -LXC_MEM="1024" - -# Defines the amount of swap space in MB your LXC container is allowed to use (default: 1024) -LXC_SWAP="1024" - -# Defines the hostname of your LXC container -LXC_HOSTNAME="${service}" - -# Defines the domain name / search domain of your LXC container -LXC_DOMAIN="zmb.rocks" - -# Enable DHCP on LAN (eth0) - (Obtain an IP address automatically) [true/false] -LXC_DHCP=false - -# Defines the local IP address and subnet of your LXC container in CIDR format -LXC_IP="192.168.100.200/24" - -# Defines the default gateway IP address of your LXC container -LXC_GW="192.168.100.254" - -# Defines the DNS server ip address of your LXC container -# `zmb-ad` used this DNS server for installation, after installation and domain provisioning it will be used as forwarding DNS -# For other services this should be your active directory domain controller (if present, else a DNS server of your choice) -LXC_DNS="192.168.100.254" - -# Defines the network bridge to bind the network adapter of your LXC container -LXC_BRIDGE="vmbr0" - -# Defines the vlan id of the LXC container's network interface, if the network adapter should be connected untagged, just leave the value empty. -LXC_VLAN= - -# Defines the `root` password of your LXC container. Please use 'single quatation marks' to avoid unexpected behaviour. -LXC_PWD='Start!123' - -# Defines an authorized_keys file to push into the LXC container. -# By default the authorized_keys will be inherited from your proxmox host. -LXC_AUTHORIZED_KEY=~/.ssh/authorized_keys - -# Define your (administrative) tools, you always want to have installed into your LXC container -LXC_TOOLSET="vim htop net-tools dnsutils sysstat mc" - -# Define the local timezone of your LXC container (default: Euroe/Berlin) -LXC_TIMEZONE="Europe/Berlin" - -# Define system language on LXC container (locales) -# With this paramater you can generate additional locales, the default language will be inherited from proxmox host. -# en_US.UTF-8 english -# de_DE.UTF-8 german (default) -LXC_LOCALE="de_DE.UTF-8" - -# Set dark background for vim syntax highlighting (0 or 1) -LXC_VIM_BG_DARK=1 - -############### Zamba-Server-Section ############### - -# Defines the REALM for the Active Directory (AD DC, AD member) -ZMB_REALM="ZMB.ROCKS" -# Defines the domain name in your Active Directory or Workgroup (AD DC, AD member, standalone) -ZMB_DOMAIN="ZMB" - -# Defines the name of your domain administrator account (AD DC, AD member, standalone) -ZMB_ADMIN_USER="administrator" -# The admin password for zamba installation. Please use 'single quatation marks' to avoid unexpected behaviour -# `zmb-ad` domain administrator has to meet the password complexity policy, if password is too weak, domain provisioning will fail -ZMB_ADMIN_PASS='Start!123' - -# Defines the name of your Zamba share -ZMB_SHARE="share" - -############### Mailpiler-Section ############### - -# Defines the (public) FQDN of your piler mail archive -PILER_FQDN="mailpiler.zmb.rocks" -# Defines the smarthost for piler mail archive -PILER_SMARTHOST="mail.zmb.rocks" - -############### Matrix-Section ############### - -# Define the FQDN of your Matrix server -MATRIX_FQDN="matrix.zmb.rocks" - -# Define the FQDN for the Element Web virtual host -MATRIX_ELEMENT_FQDN="element.zmb.rocks" - -# Define the administrative user of matrix service -MATRIX_ADMIN_USER="admin" - -# Define the admin password -MATRIX_ADMIN_PASSWORD="Start!123" - -############### Nextcloud-Section ############### - -# Define the FQDN of your Nextcloud server -NEXTCLOUD_FQDN="nextcloud.zmb.rocks" - -# The initial admin-user which will be configured -NEXTCLOUD_ADMIN_USR="zmb-admin" - -# Build a strong password for this user. Username and password will shown at the end of the instalation. -NEXTCLOUD_ADMIN_PWD="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" - -# Defines the data directory, which will be createt under LXC_SHAREFS_MOUNTPOINT -NEXTCLOUD_DATA="nc_data" - -# Defines the trusted reverse proxy, which will enable the detection of source ip to fail2ban -NEXTCLOUD_REVPROX="192.168.100.254" - -############### Check_MK-Section ############### - -# Define the name of your checkmk instance -CMK_INSTANCE=zmbrocks - -# Define the password of user 'cmkadmin' -CMK_ADMIN_PW='Start!123' - -# checkmk edition (raw or free) -# raw = completely free -# free = limited version of the enterprise edition (25 hosts, 1 instance) -CMK_EDITION=raw