summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDengfeng Liu <liudf0716@gmail.com>2022-10-14 08:36:16 +0000
committerRosen Penev <rosenp@gmail.com>2022-10-21 15:33:50 -0700
commita7e3f28c3761de6e7eed5423fbd116eeeec38491 (patch)
tree2905e2033f7d70f1dbf82586e845b8a4e91f3cee
parent88aa9c2e2da4052b11c0685d60c04664b2731ffa (diff)
xfrpc: allow server_addr ip and domain
Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
-rwxr-xr-xnet/xfrpc/files/xfrpc.init6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/xfrpc/files/xfrpc.init b/net/xfrpc/files/xfrpc.init
index aa999bc68..3b0ddedaf 100755
--- a/net/xfrpc/files/xfrpc.init
+++ b/net/xfrpc/files/xfrpc.init
@@ -34,14 +34,16 @@ handle_xfrpc() {
;;
http|https)
config_get custom_domains "$name" custom_domains
- echo "custom_domains = $custom_domains" >> "$config"
+ [ -z "$custom_domains" ] || echo "custom_domains = $custom_domains" >> "$config"
+ config_get subdomain "$name" subdomain
+ [ -z "$subdomain" ] || echo "subdomain = $subdomain" >> "$config"
;;
esac
}
if [ "$name" = "common" ]; then
uci_validate_section xfrpc xfrp "$name" \
- 'server_addr:ipaddr' \
+ 'server_addr:host' \
'server_port:uinteger' \
'token:string:'