* Add some checks before replace certificates * Change if check key * Refactoring code * Refactoring code * Add checking exist files * Refactor: refactoring code * Remove check files conditions
This commit is contained in:
parent
143e77fdfc
commit
06a05223b5
1 changed files with 5 additions and 3 deletions
|
@ -39,9 +39,11 @@ fi
|
||||||
|
|
||||||
SSL_CERTIFICATES_DIR="/usr/share/ca-certificates/ds"
|
SSL_CERTIFICATES_DIR="/usr/share/ca-certificates/ds"
|
||||||
mkdir -p ${SSL_CERTIFICATES_DIR}
|
mkdir -p ${SSL_CERTIFICATES_DIR}
|
||||||
cp -f ${DATA_DIR}/certs/* ${SSL_CERTIFICATES_DIR}
|
if [[ -d ${DATA_DIR}/certs ]] && [ -e ${DATA_DIR}/certs/*.crt ]; then
|
||||||
chmod 644 ${SSL_CERTIFICATES_DIR}/*.crt ${SSL_CERTIFICATES_DIR}/*.pem
|
cp -f ${DATA_DIR}/certs/* ${SSL_CERTIFICATES_DIR}
|
||||||
chmod 400 ${SSL_CERTIFICATES_DIR}/*.key
|
chmod 644 ${SSL_CERTIFICATES_DIR}/*.crt ${SSL_CERTIFICATES_DIR}/*.pem
|
||||||
|
chmod 400 ${SSL_CERTIFICATES_DIR}/*.key
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z $SSL_CERTIFICATE_PATH ]] && [[ -f ${SSL_CERTIFICATES_DIR}/${COMPANY_NAME}.crt ]]; then
|
if [[ -z $SSL_CERTIFICATE_PATH ]] && [[ -f ${SSL_CERTIFICATES_DIR}/${COMPANY_NAME}.crt ]]; then
|
||||||
SSL_CERTIFICATE_PATH=${SSL_CERTIFICATES_DIR}/${COMPANY_NAME}.crt
|
SSL_CERTIFICATE_PATH=${SSL_CERTIFICATES_DIR}/${COMPANY_NAME}.crt
|
||||||
|
|
Loading…
Reference in a new issue