* add some reader classes to get the configuration * adapt unittests * get config from json or toml file * loop over all config readers to get the configuration * rename config test files * use relative paths for coverage test in vscode * do not throw an error for missing config files * remove obsolete tests * use dotted key notation for pv sub dictonary * log config reading progress * remove create_config_toml.py * remove obsolete tests for the ha_addon * disable mosquitto tests if the server is down * ignore main method for test coverage * increase test coverage * pytest-cov: use relative_files only on github, so coverage will work with vscode locally * remove unneeded imports * add missing test cases * disable branch coverage, cause its not reachable
36 lines
756 B
Bash
Executable File
36 lines
756 B
Bash
Executable File
#!/usr/bin/with-contenv bashio
|
|
|
|
echo "Add-on environment started"
|
|
|
|
echo "check for Home Assistant MQTT"
|
|
MQTT_HOST=$(bashio::services mqtt "host")
|
|
MQTT_PORT=$(bashio::services mqtt "port")
|
|
MQTT_USER=$(bashio::services mqtt "username")
|
|
MQTT_PASSWORD=$(bashio::services mqtt "password")
|
|
|
|
# wenn host gefunden wurde, dann nachricht ausgeben
|
|
if [ -z "$MQTT_HOST" ]; then
|
|
echo "MQTT not found"
|
|
else
|
|
echo "MQTT found"
|
|
export MQTT_HOST
|
|
export MQTT_PORT
|
|
export MQTT_USER
|
|
export MQTT_PASSWORD
|
|
fi
|
|
|
|
|
|
|
|
cd /home || exit
|
|
|
|
# Erstelle Ordner für log und config
|
|
mkdir -p proxy/log
|
|
mkdir -p proxy/config
|
|
|
|
cd /home/proxy || exit
|
|
|
|
export VERSION=$(cat /proxy-version.txt)
|
|
|
|
echo "Start Proxyserver..."
|
|
python3 server.py --json_config=/data/options.json
|