maxcube-mqtt/entrypoint
2022-11-29 21:12:24 +01:00

13 lines
284 B
Bash
Executable file

#!/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 "$@"