From 6f0d9da1f56db51aa8867fc50238cef84413a54e Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Wed, 7 Aug 2024 17:48:29 +0200 Subject: [PATCH] update-ca-bundle: really avoid failure on missing directory While no problem was observed while XAPI launches this script, and there is little reason to launch it while the certs dir does not exist (except maybe for testing purposes), there is existing logic to create /etc/stunnel, which when needed will still let `find` fail for lack of /etc/stunnel/certs. Signed-off-by: Yann Dirson --- scripts/update-ca-bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-ca-bundle.sh b/scripts/update-ca-bundle.sh index 16ee34ab9e3..f0452e6143c 100755 --- a/scripts/update-ca-bundle.sh +++ b/scripts/update-ca-bundle.sh @@ -5,6 +5,6 @@ set -e -mkdir -p /etc/stunnel +mkdir -p /etc/stunnel/certs find /etc/stunnel/certs -name '*.pem' | xargs cat > /etc/stunnel/xapi-stunnel-ca-bundle.pem.tmp mv /etc/stunnel/xapi-stunnel-ca-bundle.pem.tmp /etc/stunnel/xapi-stunnel-ca-bundle.pem