@@ -31,8 +31,21 @@ run_nginx_container --hosts "${domains[0]}"
3131# Wait for a symlink at /etc/nginx/certs/${domains[0]}.crt
3232wait_for_symlink " ${domains[0]} " " $le_container_name "
3333
34+ # Hard set the account dir based on the test ACME CA used.
35+ case $ACME_CA in
36+ pebble)
37+ account_dir=" pebble/dir"
38+ ;;
39+ boulder)
40+ account_dir=" boulder/directory"
41+ ;;
42+ * )
43+ echo " $0 $ACME_CA : invalid option."
44+ exit 1
45+ esac
46+
3447# Test if the expected folder / file / content are there.
35- json_file=" /etc/acme.sh/default/ca/$ACME_CA /account.json"
48+ json_file=" /etc/acme.sh/default/ca/$account_dir /account.json"
3649if [[ " $ACME_CA " == ' boulder' ]]; then
3750 no_mail_str=' []'
3851elif [[ " $ACME_CA " == ' pebble' ]]; then
@@ -64,7 +77,7 @@ run_nginx_container --hosts "${domains[1]}"
6477wait_for_symlink " ${domains[1]} " " $le_container_name "
6578
6679# Test if the expected folder / file / content are there.
67- json_file=" /etc/acme.sh/${default_email} /ca/$ACME_CA /account.json"
80+ json_file=" /etc/acme.sh/${default_email} /ca/$account_dir /account.json"
6881if docker exec " $le_container_name " [[ ! -d " /etc/acme.sh/$default_email " ]]; then
6982 echo " The /etc/acme.sh/$default_email folder does not exist."
7083elif docker exec " $le_container_name " [[ ! -f " $json_file " ]]; then
@@ -82,7 +95,7 @@ run_nginx_container --hosts "${domains[2]}" --cli-args "--env LETSENCRYPT_EMAIL=
8295wait_for_symlink " ${domains[2]} " " $le_container_name "
8396
8497# Test if the expected folder / file / content are there.
85- json_file=" /etc/acme.sh/${container_email} /ca/$ACME_CA /account.json"
98+ json_file=" /etc/acme.sh/${container_email} /ca/$account_dir /account.json"
8699if docker exec " $le_container_name " [[ ! -d " /etc/acme.sh/$container_email " ]]; then
87100 echo " The /etc/acme.sh/$container_email folder does not exist."
88101elif docker exec " $le_container_name " [[ ! -f " $json_file " ]]; then
0 commit comments