list domains example.org
list domains sub.example.org
list domains *.sub.example.org
+ option validation_method dns
option dns "dns_freedns"
list credentials 'FREEDNS_User="ssladmin@example.org"'
list credentials 'FREEDNS_Password="1234"'
option staging 1
list domains example.org
list domains sub.example.org
+ validation_method webroot
export acme_server
config_get days "$section" days
export days
- config_get standalone "$section" standalone 0
- export standalone
+ config_get standalone "$section" standalone
+ [ -n "$standalone" ] && log warn "Option \"standalone\" is deprecated."
config_get dns_wait "$section" dns_wait
export dns_wait
if [ "$webroot" ]; then
log warn "Option \"webroot\" is deprecated, please remove it and change your web server's config so it serves ACME challenge requests from $CHALLENGE_DIR."
fi
+
+ config_get validation_method "$section" validation_method
+ # if validation_method isn't set then guess it
+ if [ -z "$validation_method" ]; then
+ if [ -n "$dns" ]; then
+ validation_method="dns"
+ elif [ "$standalone" = 1 ]; then
+ validation_method="standalone"
+ else
+ validation_method="webroot"
+ fi
+ log warn "Please set \"option validation_method $validation_method\"."
+ fi
+ export validation_method
}
first_arg() {
[ "$enabled" = 1 ] || return
load_options "$section"
- if [ -z "$dns" ] && [ "$standalone" = 0 ]; then
+ if [ "$validation_method" = "webroot" ]; then
mkdir -p "$CHALLENGE_DIR"
fi
- if [ "$standalone" = 1 ] && [ -z "$NFT_HANDLE" ]; then
+ if [ "$validation_method" = "standalone" ] && [ -z "$NFT_HANDLE" ]; then
if ! NFT_HANDLE=$(nft -a -e insert rule inet fw4 input tcp dport 80 counter accept comment ACME | grep -o 'handle [0-9]\+'); then
return 1
fi