zigbee2mqtt/docker/run.sh

21 lines
375 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
2018-06-01 10:29:03 -07:00
if [ ! -z "$DEBUG" ]; then
npm start
else
DEBUG="$DEBUG" npm start
fi