summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/consul-template/files/consul-template.initd')
-rw-r--r--app-admin/consul-template/files/consul-template.initd9
1 files changed, 8 insertions, 1 deletions
diff --git a/app-admin/consul-template/files/consul-template.initd b/app-admin/consul-template/files/consul-template.initd
index 7add14f3a57..ab63e7fd759 100644
--- a/app-admin/consul-template/files/consul-template.initd
+++ b/app-admin/consul-template/files/consul-template.initd
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 2015 Gentoo Foundation
+# Copyright 2015-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -23,3 +23,10 @@ depend() {
start_pre() {
checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
}
+
+stop() {
+ # SIGINT is required for graceful shutdown of consul-template
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --signal SIGINT --pidfile "${pidfile}"
+ eend $?
+}