From 4a46bcc349e0465bb0984a82883d914e89556ed0 Mon Sep 17 00:00:00 2001 From: p_magyar Date: Tue, 16 Apr 2024 19:29:09 +0200 Subject: [PATCH] added run.sh; removed *.sh from gitignore --- .gitignore | 1 - run.sh | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 run.sh 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