mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-10 19:11:16 +00:00
28 lines
582 B
Bash
Executable File
28 lines
582 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -u
|
|
set -o pipefail
|
|
|
|
|
|
############################################################
|
|
# Functions
|
|
############################################################
|
|
|
|
###
|
|
### Include certificates/CAs into own system
|
|
###
|
|
update_ca_certificates() {
|
|
local dir="${1}"
|
|
local debug="${2}"
|
|
|
|
if [ -d "${dir}" ]; then
|
|
# shellcheck disable=SC2044
|
|
for cert in $( find "${dir}" -name \*.crt ); do
|
|
name="$( basename "${cert}" )"
|
|
run "cp ${cert} /usr/local/share/ca-certificates/devilbox-${name}" "${debug}"
|
|
done
|
|
fi
|
|
run "update-ca-certificates" "${debug}"
|
|
}
|