From e0aa991878bb1a46693e1f3d37e6609343bad435 Mon Sep 17 00:00:00 2001 From: Carsten Date: Thu, 17 Aug 2023 17:18:31 +0200 Subject: [PATCH] rei3 hinzugefuegt --- src/rei3/constants-service.conf | 42 +++++++++++++++++++++++++++++++++ src/rei3/install-service.sh | 42 +++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 src/rei3/constants-service.conf create mode 100644 src/rei3/install-service.sh diff --git a/src/rei3/constants-service.conf b/src/rei3/constants-service.conf new file mode 100644 index 0000000..c941967 --- /dev/null +++ b/src/rei3/constants-service.conf @@ -0,0 +1,42 @@ +#!/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-12-standard" + +# Create sharefs mountpoint +LXC_MP="0" + +# Create unprivileged container +LXC_UNPRIVILEGED="1" + +# enable nesting feature +LXC_NESTING="1" + + +# Defines the IP from the SQL server +REI3_DB_IP="127.0.0.1" + +# Defines the PORT from the SQL server +REI3_DB_PORT="5432" + +# Defines the name from the SQL database +REI3_DB_NAME="app" + +# Defines the name from the SQL user +REI3_DB_USR="rei3" + +# Build a strong password for the SQL user - could be overwritten with something fixed +REI3_DB_PWD="$(random_password)" + +# Sets the minimum amount of RAM the service needs for operation +LXC_MEM_MIN=4096 + +# service dependent meta tags +SERVICE_TAGS="postgresql" diff --git a/src/rei3/install-service.sh b/src/rei3/install-service.sh new file mode 100644 index 0000000..0d18b50 --- /dev/null +++ b/src/rei3/install-service.sh @@ -0,0 +1,42 @@ +#!/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 + +mkdir /opt/rei3 +wget -c https://rei3.de/downloads/REI3_3.4.2_x64_linux.tar.gz -O - | tar -zx -C /opt/rei3 + +wget -q -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/postgres.gpg +echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list + +apt update + +DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq dist-upgrade +DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq install --no-install-recommends postgresql imagemagick ghostscript postgresql-client + +timedatectl set-timezone ${LXC_TIMEZONE} + +systemctl enable --now postgresql + +su - postgres <