Skip to content

Commit

Permalink
Merge pull request #314 from strings48066/issue311
Browse files Browse the repository at this point in the history
subbing out @name in stop function with an ambiguous name.
  • Loading branch information
bastelfreak authored May 20, 2019
2 parents b26f4e0 + ef90228 commit fb5b799
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/daemon.sysv.erb
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ stop() {
echo -n "Shutting down prometheus <%= @name %>: "
mkpidfile

<%= @name %>_pid=$(cat $PID_FILE)
prometheus_pid=$(cat $PID_FILE)
killproc $KILLPROC_OPT $DAEMON -INT
retcode=$?

# We'll wait if necessary to make sure the leave works, and return
# early if we can. If not, escalate to harsher signals.
try=0
while [ $try -lt $DELAY ]; do
if ! checkpid $<%= @name %>_pid ; then
if ! checkpid $prometheus_pid ; then
rm -f /var/lock/subsys/<%= @name %>
return $retcode
fi
Expand Down

0 comments on commit fb5b799

Please sign in to comment.