-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy path.env
More file actions
34 lines (28 loc) · 1020 Bytes
/
.env
File metadata and controls
34 lines (28 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
REPO_ROOT=`git rev-parse --show-toplevel`
# Clear existing environment variables
export -n AIO_BROKER_HOSTNAME
export -n AIO_BROKER_TCP_PORT
export -n AIO_MQTT_CLIENT_ID
export -n AIO_MQTT_USE_TLS
export -n AIO_TLS_CA_FILE
export -n AIO_SAT_FILE
export -n AIO_TLS_CERT_FILE
export -n AIO_TLS_KEY_FILE
# Common environment variables for all authentication configurations
export AIO_BROKER_HOSTNAME=localhost
export AIO_MQTT_CLIENT_ID=sdk-sample-app
# No TLS, no authentication
# export AIO_BROKER_TCP_PORT=1883
# export AIO_MQTT_USE_TLS=false
# TLS, SAT authentication
export AIO_BROKER_TCP_PORT=8884
export AIO_MQTT_USE_TLS=true
export AIO_TLS_CA_FILE=$REPO_ROOT/.session/broker-ca.crt
export AIO_SAT_FILE=$REPO_ROOT/.session/token.txt
# TLS, x509 authentication
# export AIO_BROKER_TCP_PORT=8883
# export AIO_MQTT_USE_TLS=true
# export AIO_TLS_CA_FILE=$REPO_ROOT/.session/broker-ca.crt
# export AIO_TLS_CERT_FILE=$REPO_ROOT/.session/client.crt
# export AIO_TLS_KEY_FILE=$REPO_ROOT/.session/client.key