Skip to content

Commit

Permalink
Merge pull request #142 from lkebin/patch-1
Browse files Browse the repository at this point in the history
Update gearmand.init.in
  • Loading branch information
SpamapS authored Nov 4, 2017
2 parents 4762030 + 1df7806 commit bda9f3c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions support/gearmand.init.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ prog=@PACKAGE@
# Source function library.
. /etc/rc.d/init.d/functions

if [ -f @sysconf@ ]; then
. @sysconf@
if [ -f $sysconf ]; then
. $sysconf
fi

[ -z "${PIDFILE}" ] && pidfile="@localstatedir@/run/@PACKAGE@/@PACKAGE@.pid"
Expand All @@ -51,6 +51,14 @@ stop() {
[ $RETVAL = 0 ] && rm -f $lockfile $pidfile
}

reload() {
echo -n $"Reloading $prog: "
killproc -p $pidfile $gearmand -SIGHUP
RETVAL=$?
echo
[ $RETVAL = 0 ]
}

# See how we were called.
case "$1" in
start)
Expand All @@ -64,8 +72,7 @@ case "$1" in
RETVAL=$?
;;
restart|reload)
stop
start
reload
;;
condrestart|try-restart)
if status -p $pidfile $gearmand >&/dev/null; then
Expand Down

0 comments on commit bda9f3c

Please sign in to comment.