aboutsummaryrefslogtreecommitdiffstats
path: root/community/consul-template/consul-template.initd
blob: d0f6b7ed7a37b0db9601610a0951f81a83a1ce3f (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"

daemon=/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 $?
}