You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: layers/chirpstack/meta-chirpstack/recipes-chirpstack/chirpstack-gateway-bridge/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
+35-28Lines changed: 35 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -21,17 +21,17 @@ log_to_syslog=true
21
21
# Backend type.
22
22
type="concentratord"
23
23
24
-
# ChirpStack Concentratord backend.
25
-
[backend.concentratord]
24
+
# ChirpStack Concentratord backend.
25
+
[backend.concentratord]
26
26
27
-
# Check for CRC OK.
28
-
crc_check=true
27
+
# Check for CRC OK.
28
+
crc_check=true
29
29
30
-
# Event API URL.
31
-
event_url="ipc:///tmp/concentratord_event"
30
+
# Event API URL.
31
+
event_url="ipc:///tmp/concentratord_event"
32
32
33
-
# Command API URL.
34
-
command_url="ipc:///tmp/concentratord_command"
33
+
# Command API URL.
34
+
command_url="ipc:///tmp/concentratord_command"
35
35
36
36
37
37
# Integration configuration.
@@ -43,28 +43,35 @@ type="concentratord"
43
43
# * json: JSON encoding (easier for debugging, but less compact than 'protobuf')
MQTT_BROKER=$(dialog --inputbox "Please enter the MQTT broker address (e.g. tcp://server:1883, ssl://server:8883): " 8 60 \
441
+
3>&11>&22>&3)
442
+
RET=$?
443
+
if [ $RET-eq 1 ];then
444
+
return;
445
+
fi
446
+
sed -i "s/server=.*/server=\"${MQTT_BROKER//\//\\/}\"/" /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
447
+
448
+
# ca cert
449
+
dialog --yesno "Would you like to configure a CA certificate?" 6 60
450
+
RET=$?
451
+
if [ $RET-eq 0 ];then
452
+
touch /etc/chirpstack-gateway-bridge/ca.pem
453
+
454
+
dialog --title "MQTT connection wizard" --msgbox "Enter the content of the CA certificate in the next screen and close the editor with Ctrl+X." 7 60
455
+
sed -i "s/ca_cert=.*/ca_cert=\"\/etc\/chirpstack-gateway-bridge\/ca.pem\"/" /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
456
+
nano /etc/chirpstack-gateway-bridge/ca.pem
457
+
else
458
+
sed -i "s/tls_cert=.*/tls_cert=\"\"/" /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
459
+
fi
460
+
461
+
# client cert
462
+
dialog --yesno "Would you like to configure a client certificate?" 6 60
463
+
RET=$?
464
+
if [ $RET-eq 0 ];then
465
+
touch /etc/chirpstack-gateway-bridge/cert.pem
466
+
touch /etc/chirpstack-gateway-bridge/key.pem
467
+
468
+
dialog --title "MQTT connection wizard" --msgbox "Enter the content of the client-certificate in the next screen and close the editor with Ctrl+X." 7 60
469
+
sed -i "s/tls_cert=.*/tls_cert=\"\/etc\/chirpstack-gateway-bridge\/cert.pem\"/" /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
470
+
nano /etc/chirpstack-gateway-bridge/cert.pem
471
+
472
+
dialog --title "MQTT connection wizard" --msgbox "Enter the content of the client-certificate key in the next screen and close the editor with Ctrl+X." 7 60
473
+
sed -i "s/tls_key=.*/tls_key=\"\/etc\/chirpstack-gateway-bridge\/key.pem\"/" /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
474
+
nano /etc/chirpstack-gateway-bridge/key.pem
475
+
else
476
+
sed -i "s/tls_cert=.*/tls_cert=\"\"/" /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
477
+
sed -i "s/tls_key=.*/tls_key=\"\"/" /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml
0 commit comments