summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Palsson <karlp@etactica.com>2017-06-07 16:44:36 +0000
committerKarl Palsson <karlp@etactica.com>2017-08-16 15:00:53 +0000
commit43acdcdd541dfb85d20eba7c17486aa2e1a90565 (patch)
treec6526f4b0742dcf373c71d251df9ee80c1a18eb1
parent2f8327ec4b7910fe09b14f1165c660fd817ba28b (diff)
mosquitto: support more config options in UCI
Added many more UCI config options, particularly for bridge connections The recently introduced username/password options for bridges are kept, even though they have been deprecated upstream for a while. In keeping with this, while support is kept in UCI, the generated mosquitto.conf file will always generate the "modern" remote_username/remote_password options preferred by mosquitto instead. Likewise for bridge clientid and remote_clientid options. Signed-off-by: Karl Palsson <karlp@etactica.com>
-rwxr-xr-xnet/mosquitto/files/etc/init.d/mosquitto33
1 files changed, 31 insertions, 2 deletions
diff --git a/net/mosquitto/files/etc/init.d/mosquitto b/net/mosquitto/files/etc/init.d/mosquitto
index 65c83fc93..dbe8d1518 100755
--- a/net/mosquitto/files/etc/init.d/mosquitto
+++ b/net/mosquitto/files/etc/init.d/mosquitto
@@ -64,6 +64,7 @@ convert_mosq_general() {
append_if "$1" protocol
append_if "$1" max_inflight_messages
append_if "$1" max_queued_messages
+ append_if "$1" sys_interval
}
convert_persistence() {
@@ -99,6 +100,18 @@ add_listener() {
fi
append_if "$1" protocol
+ append_if "$1" http_dir
+ append_optional_bool "$1" use_username_as_clientid use_username_as_clientid
+ append_if "$1" cafile
+ append_if "$1" capath
+ append_if "$1" certfile
+ append_if "$1" keyfile
+ append_if "$1" tls_version
+ append_optional_bool "$1" require_certificate require_certificate
+ append_optional_bool "$1" use_identity_as_username use_identity_as_username
+ append_if "$1" crlfile
+ append_if "$1" ciphers
+ append_if "$1" psk_hint
}
add_topic() {
@@ -121,8 +134,20 @@ add_bridge() {
append_optional_bool "$1" cleansession cleansession
append_optional_bool "$1" try_private try_private
append_optional_bool "$1" notifications notifications
-
- append_if "$1" clientid
+ append_optional_bool "$1" round_robin round_robin
+
+ # Note, deprecated upstream, preserve old uci configs
+ append_if "$1" clientid remote_clientid
+ append_if "$1" remote_clientid
+ append_if "$1" local_clientid
+ append_if "$1" notification_topic
+ append_if "$1" keepalive_interval
+ append_if "$1" start_type
+ append_if "$1" restart_timeout
+ append_if "$1" idle_timeout
+ append_if "$1" threshold
+ append_if "$1" protocol_version bridge_protocol_version
+ append_optional_bool "$1" attempt_unsubscribe bridge_attempt_unsubscribe
append_if "$1" identity bridge_identity
append_if "$1" psk bridge_psk
append_if "$1" tls_version bridge_tls_version
@@ -132,8 +157,12 @@ add_bridge() {
append_if "$1" cafile bridge_cafile
append_if "$1" certfile bridge_certfile
append_if "$1" keyfile bridge_keyfile
+ # Note, deprecated upstream, preserve old uci configs
append_if "$1" username remote_username
+ # Note, deprecated upstream, preserve old uci configs
append_if "$1" password remote_password
+ append_if "$1" remote_username
+ append_if "$1" remote_password
}