Created
January 22, 2021 15:47
-
-
Save mohavirta/977316e6cebae4ff95c8696229222813 to your computer and use it in GitHub Desktop.
Teltonika TRB145 MQTT broker CA file optional
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur a/package/network/services/mosquitto/files/etc/init.d/mosquitto b/package/network/services/mosquitto/files/etc/init.d/mosquitto | |
--- a/package/network/services/mosquitto/files/etc/init.d/mosquitto 2021-01-22 12:39:16.268965752 +0200 | |
+++ b/package/network/services/mosquitto/files/etc/init.d/mosquitto 2021-01-22 12:39:39.700963482 +0200 | |
@@ -83,7 +83,7 @@ | |
# Use TLS/SSL for connection | |
if [ "$use_tls_ssl" == "1" ]; then | |
if [ "$tls_type" == "cert" ]; then | |
- echo "cafile $ca_file" >> $CONFIG | |
+ [ -n "$ca_file" ] && echo "cafile $ca_file" >> $CONFIG || echo "cafile /etc/cacert.pem" >> $CONFIG | |
echo "certfile $cert_file" >> $CONFIG | |
echo "keyfile $key_file" >> $CONFIG | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment