From 2019a6786744574036199345f83efabf37b17b69 Mon Sep 17 00:00:00 2001 From: Dominik Meyer Date: Mon, 29 Jul 2024 11:42:42 +0200 Subject: [PATCH] feat: start amanda client on container start --- client/Containerfile | 9 ++++++++- client/inetd.conf | 1 + client/scripts/entryPoint.sh | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 client/inetd.conf create mode 100755 client/scripts/entryPoint.sh diff --git a/client/Containerfile b/client/Containerfile index 91a381f..06ac746 100644 --- a/client/Containerfile +++ b/client/Containerfile @@ -21,10 +21,17 @@ FROM debian:stable-slim RUN apt-get -qy update && apt-get -qy upgrade RUN apt-get -qy install git libssl3 bash perl libglib2.0 swig libtirpc3 libreadline8 \ - libxslt1.1 libxml-simple-perl libjson-perl + libxslt1.1 libxml-simple-perl libjson-perl openbsd-inetd + +RUN apt-get -qy install tini COPY --from=builder /usr/local/ /usr/local/ +COPY inetd.conf /etc/inetd.conf +COPY scripts/entryPoint.sh /entryPoint.sh +RUN chmod +x /entryPoint.sh ENV LD_LIBRARY_PATH /usr/local/share/perl5/site_perl/auto/Amanda/Debug/ USER backup + +ENTRYPOINT ["/usr/bin/tini", "--", "/entryPoint.sh"] \ No newline at end of file diff --git a/client/inetd.conf b/client/inetd.conf new file mode 100644 index 0000000..17180ff --- /dev/null +++ b/client/inetd.conf @@ -0,0 +1 @@ +amanda stream tcp nowait backup /usr/local/libexec/amanda/amandad amandad -auth=ssl amdump \ No newline at end of file diff --git a/client/scripts/entryPoint.sh b/client/scripts/entryPoint.sh new file mode 100755 index 0000000..03abcac --- /dev/null +++ b/client/scripts/entryPoint.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +inetd -d /etc/inetd.conf \ No newline at end of file