13 lines
284 B
Bash
Executable file
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 "$@"
|