Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pidfile handling on Debian #121

Merged
merged 3 commits into from May 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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