Fix unbound_exportre_host usage
This commit is contained in:
parent
e9d306b88e
commit
f254cc649f
@ -18,7 +18,7 @@
|
||||
# unbound_exporter_log_file (string): Set file that unbound_exporter will log to
|
||||
# Default is "/var/log/unbound_exporter.log"
|
||||
# unbound_exporter_host (string): Set unbound socket path
|
||||
# Default is /var/run/local_unbound.ctl
|
||||
# Default is unix:/var/run/local_unbound.ctl
|
||||
# unbound_exporter_ca (string): Set unbound ca filename
|
||||
# Default is "" (use socket)
|
||||
# unbound_exporter_cert (string): Set unbound control cert filename
|
||||
@ -41,7 +41,10 @@ load_rc_config $name
|
||||
: ${unbound_exporter_user:=unbound}
|
||||
: ${unbound_exporter_group:=unbound}
|
||||
: ${unbound_exporter_log_file=/var/log/unbound_exporter.log}
|
||||
: ${unbound_exporter_host=/var/run/local_unbound.ctl}
|
||||
: ${unbound_exporter_host=unix:/var/run/local_unbound.ctl}
|
||||
: ${unbound_exporter_ca=""}
|
||||
: ${unbound_exporter_cert=""}
|
||||
: ${unbound_exporter_key=""}
|
||||
: ${unbound_exporter_bind=:9167}
|
||||
|
||||
pidfile=/var/run/unbound_exporter.pid
|
||||
@ -49,17 +52,12 @@ command=/usr/sbin/daemon
|
||||
procname="%%PREFIX%%/bin/unbound_exporter"
|
||||
|
||||
if [ -n "${unbound_exporter_cert}" ]; then
|
||||
command_args="-p ${pidfile} /usr/bin/env ${procname} \
|
||||
-unbound.ca ${unbound_exporter_ca} \
|
||||
-unbound.cert ${unbound_exporter_cert} \
|
||||
-unbound.key ${unbound_exporter_key} \
|
||||
-web.listen-address ${unbound_exporter_bind} \
|
||||
${unbound_exporter_args} > ${unbound_exporter_log_file} 2>&1"
|
||||
command_args="-p ${pidfile} /usr/bin/env ${procname} -unbound.host ${unbound_exporter_host} \
|
||||
-unbound.ca ${unbound_exporter_ca} -unbound.cert ${unbound_exporter_cert} -unbound.key ${unbound_exporter_key} \
|
||||
-web.listen-address ${unbound_exporter_bind} ${unbound_exporter_args} > ${unbound_exporter_log_file} 2>&1"
|
||||
else
|
||||
command_args="-p ${pidfile} /usr/bin/env ${procname} \
|
||||
-unbound.host ${unbound_exporter_host} \
|
||||
-web.listen-address ${unbound_exporter_bind} \
|
||||
${unbound_exporter_args} > ${unbound_exporter_log_file} 2>&1"
|
||||
command_args="-p ${pidfile} /usr/bin/env ${procname} -unbound.host ${unbound_exporter_host} \
|
||||
-web.listen-address ${unbound_exporter_bind} ${unbound_exporter_args} > ${unbound_exporter_log_file} 2>&1"
|
||||
fi
|
||||
|
||||
start_precmd=unbound_exporter_startprecmd
|
||||
|
Loading…
Reference in New Issue
Block a user