Merge pull request #14 from home-assistant/build

Fix mqtt userdb file (#13)
This commit is contained in:
Pascal Vizeli
2017-04-30 17:59:20 +02:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "Mosquitto broker", "name": "Mosquitto broker",
"version": "0.1", "version": "0.2",
"slug": "mosquitto", "slug": "mosquitto",
"description": "An Open Source MQTT broker", "description": "An Open Source MQTT broker",
"startup": "before", "startup": "before",

View File

@@ -41,6 +41,7 @@ fi
if [ "$LOGINS" -gt "0" ]; then if [ "$LOGINS" -gt "0" ]; then
sed -i "s/#password_file/password_file/g" /etc/mosquitto.conf sed -i "s/#password_file/password_file/g" /etc/mosquitto.conf
rm -f /data/users.db || true rm -f /data/users.db || true
touch /data/users.db
for (( i=0; i < "$LOGINS"; i++ )); do for (( i=0; i < "$LOGINS"; i++ )); do
USERNAME=$(jq --raw-output ".logins[$i].username" $CONFIG_PATH) USERNAME=$(jq --raw-output ".logins[$i].username" $CONFIG_PATH)