]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
make certdir a parameter to sign_domain
authortypingArtist <matthias@waechter.wiz.at>
Sun, 8 Oct 2017 08:24:22 +0000 (10:24 +0200)
committerLukas Schauer <lukas@schauer.so>
Sun, 17 Dec 2017 21:55:12 +0000 (22:55 +0100)
dehydrated

index 3e03f73ac4765cf5bd9441a8dba201e456a9fc9a..3f57d557f79b2434b8eb49eca849aa838181f286 100755 (executable)
@@ -717,6 +717,8 @@ walk_chain() {
 
 # Create certificate for domain(s)
 sign_domain() {
+  local certdir="${1}"
+  shift
   domain="${1}"
   altnames="${*}"
   timestamp="$(date +%s)"
@@ -728,8 +730,6 @@ sign_domain() {
     _exiterr "Certificate authority doesn't allow certificate signing"
   fi
 
-  local certdir="${CERTDIR}/${domain}"
-
   # If there is no existing certificate directory => make it
   if [[ ! -e "${certdir}" ]]; then
     echo " + Creating new directory ${certdir} ..."
@@ -1038,10 +1038,10 @@ command_sign_domains() {
     if [[ ! "${skip}" = "yes" ]]; then
       update_ocsp="yes"
       if [[ "${PARAM_KEEP_GOING:-}" = "yes" ]]; then
-        sign_domain ${line} &
+        sign_domain "${certdir}" ${domain} ${morenames} &
         wait $! || true
       else
-        sign_domain ${line}
+        sign_domain "${certdir}" ${domain} ${morenames}
       fi
     fi