From aaf4bfb3380200a530cfd2e742281844d7bcb154 Mon Sep 17 00:00:00 2001 From: bucde Date: Thu, 23 Sep 2021 18:38:26 +0200 Subject: [PATCH] fix: read vars from existing config file --- setup | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup b/setup index e740d4a..a1f5e4a 100755 --- a/setup +++ b/setup @@ -80,6 +80,14 @@ if [ $CONFIG_EXISTS == "false" ] || [ $USE_EXISTING_CONFIG == "n" ]; then echo "Config file 'config' created!" else echo "Use existing config file 'config'!" + + while read line; do + if [[ $line == *"PAPERLESS_HOST_IP_ADDRESS="* ]]; then + PAPERLESS_HOST_IP_ADDRESS=$(echo $line | cut -c 27-) + elif [[ $line == *"PAPERLESS_HOST_PORT="* ]]; then + PAPERLESS_HOST_PORT=$(echo $line | cut -c 21-) + fi + done < "config" fi cat "config" >> ".env"