diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 00000000..c7a338aa --- /dev/null +++ b/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. + diff --git a/templates/consul.debian.erb b/templates/consul.debian.erb index 08429bdf..724e39a3 100644 --- a/templates/consul.debian.erb +++ b/templates/consul.debian.erb @@ -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 @@ -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