File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
host/4/bookworm/dotnet-isolated/dotnet9-isolated Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 3
3
# Source and destination directories
4
4
source_dir=" /var/ssl/root"
5
5
destination_dir=" /usr/local/share/ca-certificates"
6
+ need_certificate_update=false
7
+
8
+ if [[ " $WEBSITES_INCLUDE_CLOUD_CERTS " == " true" ]]; then
9
+ echo " WEBSITES_INCLUDE_CLOUD_CERTS is set to true."
10
+ agc_source_dir=" /usr/local/azure/certs"
11
+ if [ " $( ls " $agc_source_dir " /* .crt 2> /dev/null) " ]; then
12
+ # Copy CA certificates
13
+ cp " $agc_source_dir " /* .crt " $destination_dir "
14
+ need_certificate_update=true
15
+ fi
16
+ else
17
+ echo " WEBSITES_INCLUDE_CLOUD_CERTS is not set to true."
18
+ fi
19
+
6
20
7
21
# Check if the source directory has no files with the .crt extension
8
22
if [ " $( ls " $source_dir " /* .crt 2> /dev/null) " ]; then
9
23
10
24
# Copy CA certificates
11
25
cp " $source_dir " /* .crt " $destination_dir "
12
26
13
- # Run update-ca-certificates command to update the CA certificate store
14
- update-ca-certificates
27
+ need_certificate_update=true
15
28
16
29
echo " CA certificates copied and updated successfully."
30
+ fi
31
+
32
+ if $need_certificate_update ; then
33
+ # Run update-ca-certificates command to update the CA certificate store
34
+ update-ca-certificates
17
35
fi
You can’t perform that action at this time.
0 commit comments