mirror of
https://github.com/outbackdingo/xmidt.git
synced 2026-08-25 14:53:55 +00:00
Add more config options via env (#35)
This commit is contained in:
Regular → Executable
+46
-24
@@ -12,7 +12,7 @@ if [[ -z "${FIRMWARE}" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${BOOT_TIME}" ]]; then
|
if [[ -z "${BOOT_TIME}" ]]; then
|
||||||
BOOT_TIME=`date +%s`
|
BOOT_TIME=$(date +%s)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${HW_MANUFACTURER}" ]]; then
|
if [[ -z "${HW_MANUFACTURER}" ]]; then
|
||||||
@@ -35,40 +35,62 @@ if [[ -z "${CMAC}" ]]; then
|
|||||||
CMAC="112233445566"
|
CMAC="112233445566"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${TOKEN_SERVER_URL}" ]]; then
|
||||||
|
TOKEN_SERVER_URL="http://themis:6501/issue"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${SSL_CERT_PATH}" ]]; then
|
||||||
|
SSL_CERT_PATH="/etc/ssl/certs/ca-certificates.crt"
|
||||||
|
fi
|
||||||
|
|
||||||
#In this docker-compose cluster, themis has mtls disabled so
|
#In this docker-compose cluster, themis has mtls disabled so
|
||||||
#feel free to ignore the --client-cert-path flag value
|
#feel free to ignore the --client-cert-path flag value
|
||||||
#it is required by parodus to fetch a token
|
#it is required by parodus to fetch a token
|
||||||
|
if [[ -z "${CLIENT_CERT_PATH}" ]]; then
|
||||||
|
CLIENT_CERT_PATH="/etc/ssl/certs/ca-certificates.crt"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# MTLS_CLIENT_* is used to authenticate with talaria.
|
||||||
|
if [[ -z "${MTLS_CLIENT_CERT_PATH}" ]]; then
|
||||||
|
MTLS_CLIENT_CERT_PATH=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${MTLS_CLIENT_KEY_PATH}" ]]; then
|
||||||
|
MTLS_CLIENT_KEY_PATH=""
|
||||||
|
fi
|
||||||
|
|
||||||
parodus --hw-model=aker-testing \
|
parodus --hw-model=aker-testing \
|
||||||
--ssl-cert-path=/etc/ssl/certs/ca-certificates.crt \
|
--ssl-cert-path=$SSL_CERT_PATH \
|
||||||
--client-cert-path=/etc/ssl/certs/ca-certificates.crt \
|
--client-cert-path=$CLIENT_CERT_PATH \
|
||||||
--hw-serial-number=$SERIAL_NUMBER \
|
--mtls-client-cert-path=$MTLS_CLIENT_CERT_PATH \
|
||||||
--hw-manufacturer=$HW_MANUFACTURER \
|
--mtls-client-key-path=$MTLS_CLIENT_KEY_PATH \
|
||||||
--hw-mac=$CMAC \
|
--hw-serial-number=$SERIAL_NUMBER \
|
||||||
--hw-last-reboot-reason=$REBOOT_REASON \
|
--hw-manufacturer=$HW_MANUFACTURER \
|
||||||
--fw-name=$FIRMWARE \
|
--hw-mac=$CMAC \
|
||||||
--boot-time=$BOOT_TIME \
|
--hw-last-reboot-reason=$REBOOT_REASON \
|
||||||
--partner-id=$PARTNER_ID \
|
--fw-name=$FIRMWARE \
|
||||||
--parodus-local-url=tcp://127.0.0.1:$parodus_port \
|
--boot-time=$BOOT_TIME \
|
||||||
--webpa-ping-timeout=60 \
|
--partner-id=$PARTNER_ID \
|
||||||
--token-server-url=http://themis:6501/issue \
|
--parodus-local-url=tcp://127.0.0.1:$parodus_port \
|
||||||
--webpa-backoff-max=2 \
|
--webpa-ping-timeout=60 \
|
||||||
--webpa-interface-used=eth0 \
|
--token-server-url=$TOKEN_SERVER_URL \
|
||||||
--webpa-url=$URL \
|
--webpa-backoff-max=2 \
|
||||||
--force-ipv4 &
|
--webpa-interface-used=eth0 \
|
||||||
|
--webpa-url=$URL \
|
||||||
|
--force-ipv4 &
|
||||||
P1=$!
|
P1=$!
|
||||||
|
|
||||||
aker -p tcp://127.0.0.1:$parodus_port \
|
aker -p tcp://127.0.0.1:$parodus_port \
|
||||||
-c tcp://127.0.0.1:$aker_port \
|
-c tcp://127.0.0.1:$aker_port \
|
||||||
-w echo \
|
-w echo \
|
||||||
-d /tmp/aker-data.msgpack \
|
-d /tmp/aker-data.msgpack \
|
||||||
-f /tmp/aker-data.msgpack.md5 \
|
-f /tmp/aker-data.msgpack.md5 \
|
||||||
-m 128 > /dev/null &
|
-m 128 >/dev/null &
|
||||||
P2=$!
|
P2=$!
|
||||||
|
|
||||||
mock_tr181 -p $parodus_port \
|
mock_tr181 -p $parodus_port \
|
||||||
-c $mocktr181_port \
|
-c $mocktr181_port \
|
||||||
-d /etc/mock_tr181.json > /dev/null &
|
-d /etc/mock_tr181.json >/dev/null &
|
||||||
P3=$!
|
P3=$!
|
||||||
|
|
||||||
wait $P1 $P2 $P3
|
wait $P1 $P2 $P3
|
||||||
|
|||||||
Reference in New Issue
Block a user