Skip to content

Commit f82ea00

Browse files
committed
Check for the presence of a file at the JS_TRUSTED_CERT_PATH
Signed-off-by: Elijah Zupancic <[email protected]>
1 parent ec1e2c5 commit f82ea00

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

common/docker-entrypoint.d/22-enable_js_fetch_trusted_certificate.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
set -e
1818

1919
if [ -f /etc/nginx/conf.d/gateway/js_fetch_trusted_certificate.conf ] && [ -n "${JS_TRUSTED_CERT_PATH+x}" ]; then
20+
if [ ! -f "${JS_TRUSTED_CERT_PATH}" ]; then
21+
>&2 echo "JS_TRUSTED_CERT_PATH environment variable error: no file found at the path: ${JS_TRUSTED_CERT_PATH}"
22+
exit 1
23+
fi
24+
2025
echo "js_fetch_trusted_certificate ${JS_TRUSTED_CERT_PATH};" >> /etc/nginx/conf.d/gateway/js_fetch_trusted_certificate.conf
2126
echo "Enabling js_fetch_trusted_certificate ${JS_TRUSTED_CERT_PATH}"
2227
fi

0 commit comments

Comments
 (0)