From 61fa6cea7e962bced013d9767ca468593ccc9306 Mon Sep 17 00:00:00 2001 From: Alex Phillips Date: Wed, 3 Nov 2021 13:35:33 -0400 Subject: [PATCH] support for additional config files --- README.md | 1 + readme-vars.yml | 4 ++++ root/etc/cont-init.d/52-config-diskover-web | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/README.md b/README.md index 8d44840..3dc6832 100644 --- a/README.md +++ b/README.md @@ -270,6 +270,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **03.11.21:** - Added more support for potential config files. * **31.10.21:** - Added xpack.security variable to ElasticSearch; added instructions to edit Constants.php in diskover; corrected command needed to manually generate an index in diskover * **11.10.21:** - Updated to diskover-community v2. * **19.11.20:** - Fix pip packages. diff --git a/readme-vars.yml b/readme-vars.yml index 9e89578..d6fc6d9 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -94,7 +94,11 @@ app_setup_block: | # changelog changelogs: +<<<<<<< HEAD - { date: "31.10.21:", desc: "Added xpack.security variable to ElasticSearch; added instructions to edit Constants.php in diskover; corrected command needed to manually generate an index in diskover" } +======= + - { date: "03.11.21:", desc: "Added more support for potential config files." } +>>>>>>> support for additional config files - { date: "11.10.21:", desc: "Updated to diskover-community v2." } - { date: "19.11.20:", desc: "Fix pip packages." } - { date: "19.12.19:", desc: "Rebasing to alpine 3.11." } diff --git a/root/etc/cont-init.d/52-config-diskover-web b/root/etc/cont-init.d/52-config-diskover-web index a01f091..1e4527e 100644 --- a/root/etc/cont-init.d/52-config-diskover-web +++ b/root/etc/cont-init.d/52-config-diskover-web @@ -14,6 +14,16 @@ for file in *.sample; do ln -sf /config/diskover-web.conf.d/$dest /app/www/public/$dest done +cd /app/www/public/tasks +for file in *.sample; do + dest=${file%.sample} + + [[ ! -e "/config/diskover-web.conf.d/$dest" ]] && \ + cp /app/www/public/tasks/$file /config/diskover-web.conf.d/$dest + + ln -sf /config/diskover-web.conf.d/$dest /app/www/public/tasks/$dest +done + # copy and set variables in Constants.php if [[ ! -e "/config/diskover-web.conf.d/Constants.php" ]]; then cp /app/www/src/diskover/Constants.php.sample /config/diskover-web.conf.d/Constants.php