Skip to content

Commit

Permalink
app-admin/consul: revbump to 0.8.4-r1 for bug 628544
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.8, Repoman-2.3.2
  • Loading branch information
zmedico committed Sep 1, 2017
1 parent 34404d3 commit 0328499
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
File renamed without changes.
28 changes: 8 additions & 20 deletions app-admin/consul/files/consul.initd
Original file line number Diff line number Diff line change
Expand Up @@ -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 $?
}

0 comments on commit 0328499

Please sign in to comment.