summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/consul')
-rw-r--r--app-admin/consul/consul-0.8.4-r1.ebuild (renamed from app-admin/consul/consul-0.8.4.ebuild)0
-rw-r--r--app-admin/consul/files/consul.initd28
2 files changed, 8 insertions, 20 deletions
diff --git a/app-admin/consul/consul-0.8.4.ebuild b/app-admin/consul/consul-0.8.4-r1.ebuild
index e12beae0d6c9..e12beae0d6c9 100644
--- a/app-admin/consul/consul-0.8.4.ebuild
+++ b/app-admin/consul/consul-0.8.4-r1.ebuild
diff --git a/app-admin/consul/files/consul.initd b/app-admin/consul/files/consul.initd
index 75836cf53cc9..b36db8aef13c 100644
--- a/app-admin/consul/files/consul.initd
+++ b/app-admin/consul/files/consul.initd
@@ -5,35 +5,23 @@
description="consul agent"
extra_started_commands="reload"
export GOMAXPROCS=${GOMAXPROCS:-2}
-group=${group:-${SVCNAME}}
-pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
-user=${user:-${SVCNAME}}
-
-command="/usr/bin/${SVCNAME}"
+group=${group:-${RC_SVCNAME}}
+user=${user:-${RC_SVCNAME}}
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+command="/usr/bin/${RC_SVCNAME}"
command_args="agent ${command_args:-config-dir=/etc/consul.d}"
command_background="true"
start_stop_daemon_args="--user ${user} --group ${group} \
- --stdout /var/log/${SVCNAME}/${SVCNAME}.log \
- --stderr /var/log/${SVCNAME}/${SVCNAME}.log"
+ --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+ --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
+stopsig="SIGINT"
depend() {
need net
- after net
}
reload() {
- ebegin "Reloading ${SVCNAME}"
+ ebegin "Reloading ${RC_SVCNAME}"
${command} reload
eend $?
}
-
-start_pre() {
- checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
-}
-
-stop() {
- # SIGINT is required for graceful shutdown of consul agent
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --signal SIGINT --pidfile "${pidfile}"
- eend $?
-}