From 1542b19c82ff5b0120f547f77d7c9642ee0e6512 Mon Sep 17 00:00:00 2001 From: Daniel Wydler Date: Fri, 4 Oct 2024 20:27:02 +0200 Subject: [PATCH] Use a sample configuration file for parsedmarc --- .gitignore | 3 ++- .../{parsedmarc.ini => parsedmarc.ini.example} | 0 setup-epk.sh | 18 ++++++++++++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) rename parsedmarc/conf/{parsedmarc.ini => parsedmarc.ini.example} (100%) diff --git a/.gitignore b/.gitignore index 66747f0..f0b25be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ # Except this file !.gitignore -.env \ No newline at end of file +.env +parsedmarc.ini \ No newline at end of file diff --git a/parsedmarc/conf/parsedmarc.ini b/parsedmarc/conf/parsedmarc.ini.example similarity index 100% rename from parsedmarc/conf/parsedmarc.ini rename to parsedmarc/conf/parsedmarc.ini.example diff --git a/setup-epk.sh b/setup-epk.sh index ad642d8..fe59e56 100644 --- a/setup-epk.sh +++ b/setup-epk.sh @@ -1,10 +1,23 @@ #!/bin/bash -# Variables +APPPATH=/opt/containers/parsedmarc-docker/parsedmarc/conf +FILE=parsedmarc.ini + +echo "Check if the file $FILE already exist."; +if [ ! -f $APPPATH/$FILE ]; then + echo "File $FILE was created successfully."; + echo + /bin/cp $APPPATH/parsedmarc.ini.example $APPPATH/$FILE +else + echo "File $FILE already exist!"; + echo +fi + +###### + APPPATH=/opt/containers/parsedmarc-docker FILE=.env - echo "Check if the file .env already exist."; if [ ! -f $APPPATH/$FILE ]; then echo "File $FILE was created successfully."; @@ -14,6 +27,7 @@ else exit 0 fi +###### echo "Set random password for the user elastic."; password=$(/bin/tr -dc 'A-Za-z0-9!?%=' < /dev/urandom | /bin/head -c 20)