mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-18 16:25:16 +01:00
18 lines
591 B
Bash
18 lines
591 B
Bash
|
#!/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
|