From b727841cccc69762440f1fbdc8389c81032ae0df Mon Sep 17 00:00:00 2001 From: "xiongdian.me" Date: Tue, 12 Dec 2023 18:08:23 +0800 Subject: [PATCH] riot: only one domain func will be exec --- scripts/riot | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/riot b/scripts/riot index ec62f33..cf53dd5 100755 --- a/scripts/riot +++ b/scripts/riot @@ -67,12 +67,11 @@ get_server_meta() { if [[ "$host" == "$domain" && "$host" != "["*"]" ]]; then domain="default" fi - if is_function ".domain"; then - ".domain" - fi local domain_func="$domain.domain" - if [[ -n "$domain" ]] && is_function "$domain_func"; then + if is_function "$domain_func"; then "$domain_func" + elif is_function ".domain"; then + ".domain" fi }