mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-18 13:44:20 +01:00
Merge pull request #14 from home-assistant/build
Fix mqtt userdb file (#13)
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user