zigbee2mqtt/docker/run.sh

17 lines
307 B
Bash
Raw Normal View History

2018-05-09 13:15:59 -07:00
#!/bin/sh
2018-05-12 01:58:06 -07:00
if [ ! -z "$ZIGBEE2MQTT_DATA" ]; then
DATA="$ZIGBEE2MQTT_DATA"
else
DATA="/app/data"
fi
echo "Using '$DATA' as data directory"
if [ ! -f "$DATA/configuration.yaml" ]; then
2018-05-09 13:15:59 -07:00
echo "Creating configuration file..."
2018-05-12 01:58:06 -07:00
cp /app/configuration.yaml "$DATA/configuration.yaml"
2018-05-09 13:15:59 -07:00
fi
npm start