Change to bashio logs

This commit is contained in:
Max Winterstein
2021-01-02 16:53:09 +01:00
parent b1997d205a
commit 53dd8f9304
2 changed files with 7 additions and 7 deletions

View File

@@ -2,6 +2,7 @@
## [0.5.0] - 2021-01-02
- Improve image recration by adding some cache buster
- Change to bashio logs
## [0.4.0] - 2021-01-02
- Change base image to `hassioaddons/debian-base`

View File

@@ -1,18 +1,17 @@
#!/usr/bin/with-contenv bashio
set -e
#!/usr/bin/env bashio
echo "Symlinking data dir"
bashio::log.info "Symlinking data dir"
mkdir -p /share/eufy-ha-mqtt-bridge/data
rm -rfv /app/data
rm -rf /app/data
ln -s /share/eufy-ha-mqtt-bridge/data /app # symlink data mount from share
echo "exporting environment vars form options file"
bashio::log.info "Generating config.yml from options.json"
echo '# Generated by homeassistant, do not edit!' > /app/data/config.yml
echo '# Edit configuration only at the add-on!' >> /app/data/config.yml
echo '# Edit configuration only at the Add-on configuration tab!' >> /app/data/config.yml
json2yml /data/options.json >> /app/data/config.yml
echo 'patching console log level'
sed -i "s/level: process.env.NODE_ENV === 'production' ? 'error' : 'debug'\,/level: 'info',/" /app/index.js
echo "starting original stuff..."
bashio::log.info "starting original stuff..."
npm run start