Skip to content

Commit

Permalink
Merge pull request #121 from weitzj/fix/120
Browse files Browse the repository at this point in the history
Fix pidfile handling on Debian
  • Loading branch information
EvanKrall committed May 21, 2015
2 parents b827b5a + 02c3634 commit d50758d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
@@ -0,0 +1,8 @@
# Change Log
All notable changes to this project will be documented in this file.

## [Unreleased][unreleased]
### Fixed
- fix bug in Debian SysVinit, which caused starting of consul agent to fail.
- fix bug in Debian SysVinit, which caused checking for the consul service status to return wrong results.

4 changes: 2 additions & 2 deletions templates/consul.debian.erb
Expand Up @@ -18,7 +18,7 @@ DESC="Consul service discovery framework"
NAME=consul
DAEMON=<%= scope.lookupvar('consul::bin_dir') %>/$NAME
PIDFILE=/var/run/$NAME/$NAME.pid
DAEMON_ARGS="agent -pid-file ${PIDFILE} -config-dir <%= scope.lookupvar('consul::config_dir') %> <%= scope.lookupvar('consul::extra_options') %>"
DAEMON_ARGS="agent -config-dir <%= scope.lookupvar('consul::config_dir') %> <%= scope.lookupvar('consul::extra_options') %>"
USER=<%= scope.lookupvar('consul::user') %>
SCRIPTNAME=/etc/init.d/$NAME

Expand Down Expand Up @@ -169,7 +169,7 @@ case "$1" in
esac
;;
status)
status_of_proc $DAEMON $NAME && exit 0 || exit $?
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
Expand Down

0 comments on commit d50758d

Please sign in to comment.