From 07b229a0849fea26627052a9f6e926412ab39982 Mon Sep 17 00:00:00 2001 From: DerFossibaer Date: Sun, 12 Feb 2023 15:56:02 +0100 Subject: [PATCH] Add new service TP-Link Omada Controller --- src/omada/constants-service.conf | 26 ++++++++++++++++++++++++++ src/omada/install-service.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 src/omada/constants-service.conf create mode 100644 src/omada/install-service.sh diff --git a/src/omada/constants-service.conf b/src/omada/constants-service.conf new file mode 100644 index 0000000..ccb3471 --- /dev/null +++ b/src/omada/constants-service.conf @@ -0,0 +1,26 @@ +#!/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" + +# Sets the minimum amount of RAM the service needs for operation +LXC_MEM_MIN=2048 + +# service dependent meta tags +SERVICE_TAGS="mongodb-server,java" \ No newline at end of file diff --git a/src/omada/install-service.sh b/src/omada/install-service.sh new file mode 100644 index 0000000..11efb2e --- /dev/null +++ b/src/omada/install-service.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -euo pipefail + +# 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 + +wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add - +add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ + +wget -O /etc/apt/trusted.gpg.d/mongodb-4.4.asc https://www.mongodb.org/static/pgp/server-4.4.asc + +echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" > /etc/apt/sources.list.d/mongodb.list + +apt update + +DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -qq adoptopenjdk-8-hotspot jsvc mongodb-org + +DL=$(wget -O - -q https://www.tp-link.com/de/support/download/omada-software-controller/ 2>/dev/null | grep Download-Detail-Software_Omada-Software-Controller | grep "Linux_x64.deb" | head -1 | cut -d'"' -f6) + +wget -O /tmp/omada.deb -q $DL + +DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -qq /tmp/omada.deb \ No newline at end of file