summaryrefslogtreecommitdiff
path: root/net/https-dns-proxy/files/https_dns_proxy.init
diff options
context:
space:
mode:
Diffstat (limited to 'net/https-dns-proxy/files/https_dns_proxy.init')
-rw-r--r--net/https-dns-proxy/files/https_dns_proxy.init12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/https-dns-proxy/files/https_dns_proxy.init b/net/https-dns-proxy/files/https_dns_proxy.init
index 333f3cac3..29bd71ed7 100644
--- a/net/https-dns-proxy/files/https_dns_proxy.init
+++ b/net/https-dns-proxy/files/https_dns_proxy.init
@@ -13,11 +13,21 @@ start_instance() {
config_get listen_port "$cfg" listen_port
config_get user "$cfg" user
config_get group "$cfg" group
+ config_get subnet_addr "$cfg" subnet_addr
+ config_get proxy_server "$cfg" proxy_server
+
+ if [ -n "$subnet_addr" ]; then
+ subnet_param="-e $subnet_addr"
+ fi
+
+ if [ -n "$proxy_server" ]; then
+ proxy_param="-t $proxy_server"
+ fi
procd_open_instance
procd_set_param command ${PROG} \
-a "$listen_addr" -p "$listen_port" \
- -u "$user" -g "$group"
+ -u "$user" -g "$group" $subnet_param $proxy_param
procd_set_param respawn
procd_close_instance
}