Browse Source

fix: read vars from existing config file

master
bucde 3 years ago
parent
commit
aaf4bfb338
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      setup

+ 8
- 0
setup View File

@ -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"


Loading…
Cancel
Save