* configure log path and max number of daily log files * don't use a subfolder for configs * use make instead of a build script * mount /homeassistant/tsun-proxy * Add venv to base image * give write access to mounted folder * intial checkin, ignore SC1091 * set advanced and stage value in config.yaml * fix typo * added watchdog and removed Port 8127 from mapping * fixed typo and use new add-on repro - change the install button to install from https://github.com/s-allius/ha-addons * add addon-rel target * disable watchdog due to exceptions in the ha supervisor * update changelog --------- Co-authored-by: Michael Metz <michael.metz@siemens.com>
34 lines
829 B
Bash
Executable File
34 lines
829 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")
|
|
|
|
# if a MQTT was/not found, drop a note
|
|
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
|
|
|
|
|
|
|
|
|
|
# Create folder for log und config files
|
|
mkdir -p /homeassistant/tsun-proxy/logs
|
|
|
|
cd /home/proxy || exit
|
|
|
|
export VERSION=$(cat /proxy-version.txt)
|
|
|
|
echo "Start Proxyserver..."
|
|
python3 server.py --json_config=/data/options.json --log_path=/homeassistant/tsun-proxy/logs/ --config_path=/homeassistant/tsun-proxy/ --log_backups=2
|