aports/testing/consul-template/consul-template.initd

21 lines
468 B
Plaintext

#!/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 $?
}