mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-22 08:38:03 +01:00
0a72f3729a
Signed-off-by: stonezdj <stonezdj@gmail.com>
18 lines
591 B
Bash
Executable File
18 lines
591 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ ! -f /etc/pki/tls/certs/ca-bundle.crt.original ]; then
|
|
cp /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt.original
|
|
fi
|
|
|
|
if [ -f /harbor_cust_cert/custom-ca-bundle.crt ]; then
|
|
if grep -q "Photon" /etc/lsb-release; then
|
|
echo "Appending custom ca bundle ..."
|
|
cp /etc/pki/tls/certs/ca-bundle.crt.original /etc/pki/tls/certs/ca-bundle.crt
|
|
cat /harbor_cust_cert/custom-ca-bundle.crt >> /etc/pki/tls/certs/ca-bundle.crt
|
|
echo "Done."
|
|
else
|
|
echo "Current OS is not Photon, skip appending ca bundle"
|
|
fi
|
|
fi |