Change data location from /share to /data; Introduce eval

This commit is contained in:
Max Winterstein
2021-03-06 10:36:41 +01:00
parent 76993f8802
commit b8b3b783c3
6 changed files with 47 additions and 13 deletions
+4 -3
View File
@@ -4,9 +4,11 @@ bashio::log.info "Exporting log level for nodejs: $(bashio::config log_level)"
export NODE_CONSOLE_LOG_LEVEL=`bashio::config log_level`
bashio::log.info "Symlinking data dir"
mkdir -p /share/eufy-ha-mqtt-bridge/data
rm -rf /app/data
ln -s /share/eufy-ha-mqtt-bridge/data /app # symlink data mount from share
ln -s /data /app
bashio::log.info "Running 'eval' commands"
eval $(bashio::config eval)
bashio::log.info "Generating config.yml from options.json"
echo '# Generated by homeassistant, do not edit!' > /app/data/config.yml
@@ -14,6 +16,5 @@ echo '# Edit configuration only at the Add-on configuration tab!' >> /app/data/c
json2yml /data/options.json >> /app/data/config.yml
bashio::log.info "Image build with version $(cat /version)"
bashio::log.info "starting original stuff..."
npm run start