diff --git a/scripts/export-config-values.sh b/scripts/export-config-values.sh index 9b7b58a..29ec5a0 100644 --- a/scripts/export-config-values.sh +++ b/scripts/export-config-values.sh @@ -1,5 +1,9 @@ #!/bin/bash -CONFIG_FILE=/boot/hydrophonitor/configuration/hydrophonitor-config.txt +if [ $# -eq 1 ]; then + CONFIG_FILE=$1 +else + CONFIG_FILE=/boot/hydrophonitor/hydrophonitor-config.txt +fi export $(grep -v '^#' $CONFIG_FILE | tr -d '[:space:]' | xargs -d '\n')