get public mqtt username and password from environment variables

This commit is contained in:
Garth Vander Houwen 2025-02-07 09:45:28 -08:00
parent 027044c1a5
commit 2392a9f16e

View file

@ -43,9 +43,8 @@ class MqttClientProxyManager {
var username = node.mqttConfig?.username
var password = node.mqttConfig?.password
if host == defaultServerAddress {
// username = ProcessInfo.processInfo.environment["publicMqttUsername"]
// password = ProcessInfo.processInfo.environment["publicMqttPsk"]
username = ProcessInfo.processInfo.environment["PUBLIC_MQTT_USERNAME"]
password = ProcessInfo.processInfo.environment["PUBLIC_MQTT_PASSWORD"]
useSsl = false
}
let root = node.mqttConfig?.root?.count ?? 0 > 0 ? node.mqttConfig?.root : "msh"