Browse Source

fix challenge token location

Due to the call to create the destination directory
via 'mkdir -p "$(dirname "$to")"', the copy_file_to_location
function requires a filename and not the directory as a
destination.

Use copy_file_to_location as it appears to be intended and
check the exit status from the `cp' invocation for failures.
pull/19/head
Eric Wong 10 years ago
committed by srvrco
parent
commit
ee2737383b
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      getssl

+ 4
- 1
getssl View File

@ -347,6 +347,9 @@ copy_file_to_location() { # copies a file, using scp if required.
error_exit "cannot create ACL directory $(basename "$to")"
fi
cp "$from" "$to"
if [ $? -ne 0 ]; then
error_exit "cannot copy $from to $to"
fi
fi
debug "copied $from to $to"
fi
@ -855,7 +858,7 @@ for d in $alldomains; do
# copy to token to acme challenge location
debug "copying file from $TEMP_DIR/$token to ${ACL[$dn]}"
copy_file_to_location "challenge token" "$TEMP_DIR/$token" "${ACL[$dn]}"
copy_file_to_location "challenge token" "$TEMP_DIR/$token" "${ACL[$dn]}/$token"
wellknown_url="http://$d/.well-known/acme-challenge/$token"
debug wellknown_url "$wellknown_url"


Loading…
Cancel
Save