diff --git a/.gitignore b/.gitignore index 47f41b0..2e6d480 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,4 @@ __* *.txt *.json *.zip -*.sh *.ini diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..7235ab9 --- /dev/null +++ b/run.sh @@ -0,0 +1,8 @@ +#!/bin/bash +if [ -f /data/options.json ]; then + set -o allexport + eval "$(jq -r 'to_entries[]|"\(.key)=\"\(.value)\""' /data/options.json)" + set +o allexport + exec python3 hc2mqtt.py +fi +exec python3 hc2mqtt.py --config ./config/config.ini