mirror of
https://github.com/mtan93/homeassistant-addons.git
synced 2026-03-08 05:21:51 +00:00
Change base image to 'hassioaddons/debian-base'
This commit is contained in:
18
eufy-ha-mqtt-bridge/run.sh
Normal file
18
eufy-ha-mqtt-bridge/run.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
set -e
|
||||
|
||||
echo "Symlinking data dir"
|
||||
mkdir -p /share/eufy-ha-mqtt-bridge/data
|
||||
rm -rfv /app/data
|
||||
ln -s /share/eufy-ha-mqtt-bridge/data /app # symlink data mount from share
|
||||
|
||||
echo "exporting environment vars form options file"
|
||||
echo '# Generated by homeassistant, do not edit!' > /app/data/config.yml
|
||||
echo '# Edit configuration only at the add-on!' >> /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..."
|
||||
npm run start
|
||||
Reference in New Issue
Block a user