From 92f7a4774c88b27374c1b98f12f42b09ca6ef1d9 Mon Sep 17 00:00:00 2001 From: thorstenspille Date: Thu, 25 Apr 2024 16:42:03 +0200 Subject: [PATCH] Replace mailpiler by piler (updgrade to 1.4) --- src/mailpiler/constants-service.conf | 36 ----- src/mailpiler/install-service.sh | 189 --------------------------- src/piler/constants-service.conf | 27 ++++ src/piler/install-service.sh | 23 ++++ 4 files changed, 50 insertions(+), 225 deletions(-) delete mode 100644 src/mailpiler/constants-service.conf delete mode 100644 src/mailpiler/install-service.sh create mode 100644 src/piler/constants-service.conf create mode 100644 src/piler/install-service.sh diff --git a/src/mailpiler/constants-service.conf b/src/mailpiler/constants-service.conf deleted file mode 100644 index b4bdda8..0000000 --- a/src/mailpiler/constants-service.conf +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# 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 - -# This file contains the project constants on service level - -# Debian Version, which will be installed -LXC_TEMPLATE_VERSION="debian-11-standard" - -# Create sharefs mountpoint -LXC_MP="0" - -# Create unprivileged container -LXC_UNPRIVILEGED="1" - -# enable nesting feature -LXC_NESTING="1" - -# enable keyctl feature -LXC_KEYCTL="0" - -# Defines the version number of piler mail archive to install (type in exact version number (e.g. 1.3.11) or '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" - -# Sets the minimum amount of RAM the service needs for operation -LXC_MEM_MIN=1024 - -# service dependent meta tags -SERVICE_TAGS="php-fpm,nginx,mariadb,sphinx" \ No newline at end of file diff --git a/src/mailpiler/install-service.sh b/src/mailpiler/install-service.sh deleted file mode 100644 index 217bfc6..0000000 --- a/src/mailpiler/install-service.sh +++ /dev/null @@ -1,189 +0,0 @@ -#!/bin/bash - -# 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 - -source /root/functions.sh -source /root/zamba.conf -source /root/constants-service.conf - -HOSTNAME=$(hostname -f) - -echo "Ensure your Hostname is set to your Piler FQDN!" - -echo $HOSTNAME - -if - [ "$HOSTNAME" != "$PILER_FQDN" ] -then - echo "Hostname doesn't match $PILER_FQDN! Check install.sh, /etc/hosts, /etc/hostname." && exit -else - echo "Hostname matches $PILER_FQDN, so starting installation." -fi - -# install php -wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add - -echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list - -apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' -add-apt-repository "deb [arch=amd64] https://mirror.wtnet.de/mariadb/repo/10.5/debian $(lsb_release -cs) main" - -apt update - -DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -qq build-essential libwrap0-dev libpst-dev tnef libytnef0-dev \ -unrtf catdoc libtre-dev tre-agrep poppler-utils libzip-dev unixodbc libpq5 libpoppler-dev openssl libssl-dev memcached telnet nginx \ -mariadb-server default-libmysqlclient-dev python3-mysqldb gcc libwrap0 libzip4 latex2rtf latex2html catdoc tnef zipcmp zipmerge ziptool libsodium23 \ -php$PILER_PHP_VERSION-{fpm,common,ldap,mysql,cli,opcache,phpdbg,gd,memcache,json,readline,zip} - -DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt remove --purge -y -qq postfix - -cat > /etc/mysql/conf.d/mailpiler.conf <> /usr/local/etc/piler/config-site.php < + +# This file contains the project constants on service level + +# Debian Version, which will be installed +LXC_TEMPLATE_VERSION="debian-12-standard" + +# Create sharefs mountpoint +LXC_MP="0" + +# Create unprivileged container +LXC_UNPRIVILEGED="1" + +# enable nesting feature +LXC_NESTING="1" + +# enable keyctl feature +LXC_KEYCTL="0" + +# Sets the minimum amount of RAM the service needs for operation +LXC_MEM_MIN=1024 + +# service dependent meta tags +SERVICE_TAGS="php-fpm,nginx,mariadb,manticore" \ No newline at end of file diff --git a/src/piler/install-service.sh b/src/piler/install-service.sh new file mode 100644 index 0000000..406861f --- /dev/null +++ b/src/piler/install-service.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Author: +# (C) 2024 Thorsten Spille + +source zamba.conf + +wget -O - https://apt.bashclub.org/gpg/bashclub.pub | gpg --dearmor > /usr/share/keyrings/bashclub-keyring.gpg + +echo "deb [signed-by=/usr/share/keyrings/bashclub-keyring.gpg] https://apt.bashclub.org/manticore bookworm main" > /etc/apt/sources.list.d/bashclub-manticore.list +echo "deb [signed-by=/usr/share/keyrings/bashclub-keyring.gpg] https://apt.bashclub.org/testing bookworm main" > /etc/apt/sources.list.d/bashclub-testing.list +apt update + +DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -qq --no-install-recommends piler + +echo -e "Installation of piler finished." +echo -e "\nFor administration please visit the following Website:" +echo -e "\thttps://${LXC_HOSTNAME}.${LXC_DOMAIN}/" +echo -e "\nLogin with following credentials:" +echo -e "\tUser: admin@local" +echo -e "\tPass: pilerrocks" +echo -e "\n\nPlease have a look the the GOBD notes (in German):" +echo -e "\thttps://${LXC_HOSTNAME}.${LXC_DOMAIN}/gobd" \ No newline at end of file