diff --git a/ssl_mgmt/ssl_mgmt b/ssl_mgmt/ssl_mgmt index c22819e..8a349cd 100755 --- a/ssl_mgmt/ssl_mgmt +++ b/ssl_mgmt/ssl_mgmt @@ -21,22 +21,6 @@ set -u -cnfFilePath=${cnfFilePath:-/etc/${0##*/}.conf} - -. $cnfFilePath - -workDir=${workDir:-/usr/lib/ssl/CA} -csrSubdir=${csrSubdir:-csr} -certSubdir=${certSubdir:-newcerts} -keySubdir=${keySubdir:-newkeys} -certDestDir=${certDestDir:-/etc/ssl/certs} -keyDestDir=${keyDestDir:-/etc/ssl/private} -CACertPath=${CACertPath:-$certDestDir/ca-cert.pem} -CAKeyPath=${CAKeyPath:-$keyDestDir/ca-key.pem} -opensslCnfFile=openssl.cnf -rootCAPwdPath=${rootCAPwdPath:-/root/passwords/root_ca} -managedCerts=${managedCerts:-$(xargs &2 - fi - exit $ret + cnfFilePath=${cnfFilePath:-/etc/${0##*/}.conf} + exit_if_no_access "$cnfFilePath" "READ" + + . $cnfFilePath + + workDir=${workDir:-/usr/lib/ssl/CA} + #workDir=${workDir:-${0%/*/*}/lib/${0##*/}} + csrSubdir=${csrSubdir:-csr} + certSubdir=${certSubdir:-newcerts} + keySubdir=${keySubdir:-newkeys} + certDestDir=${certDestDir:-/etc/ssl/certs} + keyDestDir=${keyDestDir:-/etc/ssl/private} + CACertPath=${CACertPath:-$certDestDir/ca-cert.pem} + CAKeyPath=${CAKeyPath:-$keyDestDir/ca-key.pem} + opensslCnfFile=openssl.cnf + rootCAPwdPath=${rootCAPwdPath:-/root/passwords/root_ca} + managedCerts=${managedCerts:-$(xargs