#!/bin/bash if [ -n "$MQTT_HOST" ] then sed -i "s|^ \"mqtt_host\": \".*\",| \"mqtt_host\": \"$MQTT_HOST\",|" "maxcube.json" fi if [ -n "$MQTT_PASSWORD" ] then sed -i "s|^ \"mqtt_password\": \".*\",| \"mqtt_password\": \"$MQTT_PASSWORD\",|" "maxcube.json" fi exec "$@"