You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2018/06/11 21:48:29 UTC

[couchdb-pkg] branch master updated: Fix init.d script, closes #22

This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-pkg.git


The following commit(s) were added to refs/heads/master by this push:
     new 415263d  Fix init.d script, closes #22
415263d is described below

commit 415263d8c682d5eb0adbcdbc7c615c052f064848
Author: Joan Touzet <wo...@apache.org>
AuthorDate: Mon Jun 11 14:48:12 2018 -0700

    Fix init.d script, closes #22
---
 debian/couchdb.init | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/debian/couchdb.init b/debian/couchdb.init
index 0fee249..598a912 100644
--- a/debian/couchdb.init
+++ b/debian/couchdb.init
@@ -44,11 +44,11 @@ do_usage() {
 }
 
 do_start_cmd() {
-    start-stop-daemon --start --quiet ${PIDFILE:+--pidfile ${PIDFILE}} \
+    start-stop-daemon --start ${PIDFILE:+--pidfile ${PIDFILE} --make-pidfile} \
         $START_ARGS \
         --startas $DAEMON --name $NAME --exec $DAEMON --test > /dev/null \
         || return 1
-    start-stop-daemon --start --quiet ${PIDFILE:+--pidfile ${PIDFILE}} \
+    start-stop-daemon --start ${PIDFILE:+--pidfile ${PIDFILE} --make-pidfile} \
         $START_ARGS \
         --startas $DAEMON --name $NAME --exec $DAEMON -- $DAEMON_ARGS \
         || return 2
@@ -66,11 +66,12 @@ do_start() {
 do_stop_cmd() {
     RETVAL=2
     if [ ! -z "$PID" ]; then
-        start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \
-            --pid $PID
+        start-stop-daemon --stop --retry=TERM/30/KILL/5 \
+            --pid $PIDFILE
         RETVAL="$?"
         [ "$RETVAL" = 2 ] && return 2
     fi
+    rm -f ${PIDFILE}
     return $RETVAL
 }
 

-- 
To stop receiving notification emails like this one, please contact
wohali@apache.org.