mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 14:10:04 +02:00
14 lines
443 B
Bash
14 lines
443 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# Copy creds from env vars to files on disk
|
||
|
if [ -n ${!TRITON_CREDS_PATH} ] \
|
||
|
&& [ -n ${!TRITON_CA} ] \
|
||
|
&& [ -n ${!TRITON_CERT} ] \
|
||
|
&& [ -n ${!TRITON_KEY} ]
|
||
|
then
|
||
|
mkdir -p ${TRITON_CREDS_PATH}
|
||
|
echo -e "${TRITON_CA}" | tr '#' '\n' > ${TRITON_CREDS_PATH}/ca.pem
|
||
|
echo -e "${TRITON_CERT}" | tr '#' '\n' > ${TRITON_CREDS_PATH}/cert.pem
|
||
|
echo -e "${TRITON_KEY}" | tr '#' '\n' > ${TRITON_CREDS_PATH}/key.pem
|
||
|
fi
|