#!/bin/sh

. /lib/functions.sh

if [ -f "/etc/config/mosquitto" ]; then
	uci_add mosquitto listener dmcli
	uci_set mosquitto dmcli enabled 1
	uci_set mosquitto dmcli port '9003'
	uci_set mosquitto dmcli protocol 'websockets'
	uci_set mosquitto dmcli auth_plugin '/usr/lib/mosquitto_auth_plugin.so'
	uci_set mosquitto dmcli acl_file '/etc/dmcli/dmcli.acl'
fi

exit 0
