aboutsummaryrefslogtreecommitdiffstats
path: root/community/consul-template/consul-template.initd
blob: cf1dd99b258117e59451155aa363660577e677e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/sbin/openrc-run
supervisor=supervise-daemon

name="$RC_SVCNAME"

description="template rendering, notifier, and supervisor for HashiCorp Consul and Vault data"
description_reload="Reload configuration"

command=/usr/sbin/"$RC_SVCNAME"
command_args="$CONSUL_TEMPLATE_ARGS -config ${CONFIG:-/etc/$RV_SVCNAME/$RC_SVCNAME.hcl}"

depend() {
	after vault consul
}

reload() {
	ebegin "Reloading $RC_SVCNAME configuration"
	$supervisor "$RC_SVCNAME" --signal HUP
	eend $?
}