Fix mqtt userdb file (#13)

* Update run.sh

* Update config.json
This commit is contained in:
Pascal Vizeli
2017-04-30 17:55:18 +02:00
committed by GitHub
parent 90b0ca74d0
commit 3a3143b887
2 changed files with 2 additions and 1 deletions

View File

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

View File

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