aboutsummaryrefslogtreecommitdiff
path: root/net/vallumd/files
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2022-01-09 18:24:24 +0200
committerStijn Tintel <stijn@linux-ipv6.be>2022-01-09 18:31:47 +0200
commit31fd0f03b2b13b9b762ea9e10507ccf80ec9324d (patch)
tree0c046e61b321c28ff6d44796ad9be3ee9e3d5ae6 /net/vallumd/files
parent47c31b47460ba3015c25001685cbfdf76b73f025 (diff)
vallumd: bump to 0.2.0
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Diffstat (limited to 'net/vallumd/files')
-rw-r--r--net/vallumd/files/vallumd.conf4
-rw-r--r--net/vallumd/files/vallumd.init11
2 files changed, 12 insertions, 3 deletions
diff --git a/net/vallumd/files/vallumd.conf b/net/vallumd/files/vallumd.conf
index 75703abb7..5aa6e11d6 100644
--- a/net/vallumd/files/vallumd.conf
+++ b/net/vallumd/files/vallumd.conf
@@ -1,6 +1,10 @@
config vallumd mqtt
option host 127.0.0.1
option port 1883
+ option tls 0
+ option ca /etc/ssl/certs/ca-certificates.crt
+ # option user username
+ # option pass password
list topics blacklist4
list topics blacklist6
option enabled 0
diff --git a/net/vallumd/files/vallumd.init b/net/vallumd/files/vallumd.init
index d0cb78150..f9ff60836 100644
--- a/net/vallumd/files/vallumd.init
+++ b/net/vallumd/files/vallumd.init
@@ -9,23 +9,28 @@ add_topic() {
}
start_service() {
- local enabled
- local mqtt_host
- local mqtt_port
+ local enabled mqtt_ca mqtt_host mqtt_pass mqtt_port mqtt_tls mqtt_user
config_load "vallumd"
config_get_bool enabled "mqtt" "enabled" 1
[ "$enabled" -gt 0 ] || return 1
+ config_get mqtt_ca "mqtt" "ca"
config_get mqtt_host "mqtt" "host"
+ config_get mqtt_pass "mqtt" "pass"
config_get mqtt_port "mqtt" "port"
+ config_get mqtt_tls "mqtt" "tls"
+ config_get mqtt_user "mqtt" "user"
procd_open_instance
procd_set_param command $PROG
[ -n "$mqtt_host" ] && procd_append_param command -h "$mqtt_host"
+ [ -n "$mqtt_pass" ] && procd_append_param command -P "$mqtt_pass"
[ -n "$mqtt_port" ] && procd_append_param command -p "$mqtt_port"
+ [ -n "$mqtt_user" ] && procd_append_param command -u "$mqtt_user"
+ [ $mqtt_tls -gt 0 ] && procd_append_param command -T -c "$mqtt_ca"
config_list_foreach mqtt topics add_topic
procd_set_param respawn