Patchwork [base,1/3] vsftpd: fixup restart option in initscript

login
register
mail settings
Submitter Jacob Kjaergaard
Date Oct. 4, 2013, 7:57 a.m.
Message ID <1380873445-546-1-git-send-email-jabk@prevas.dk>
Download mbox | patch
Permalink /patch/280478/
State Accepted
Delegated to: Esben Haabendal
Headers show

Comments

Jacob Kjaergaard - Oct. 4, 2013, 7:57 a.m.
From: Jacob Kjaergaard <jacob.kjaergaard@prevas.dk>

---
 recipes/vsftpd/files/init |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Esben Haabendal - Oct. 14, 2013, 2:30 p.m.
Merged to master, thanks.

/Esben

Patch

diff --git a/recipes/vsftpd/files/init b/recipes/vsftpd/files/init
index d0ec010..71031a4 100755
--- a/recipes/vsftpd/files/init
+++ b/recipes/vsftpd/files/init
@@ -4,6 +4,7 @@  NAME=vsftpd
 DESC="FTP Server"
 ARGS=""
 FTPDIR=/var/lib/ftp
+PIDFILE=/var/run/vsftpd.pid
 
 test -f $DAEMON || exit 0
 
@@ -18,12 +19,12 @@  case "$1" in
             chmod a-w $FTPDIR
             chmod u+w $FTPDIR/in
         fi
-        start-stop-daemon -S -b -x $DAEMON -- $ARGS
+        start-stop-daemon -m -p $PIDFILE -S -b  $DAEMON -- $ARGS
         echo "done."
         ;;
     stop)
         echo -n "* stopping $DESC: $NAME... "
-        start-stop-daemon -K -x $DAEMON
+        start-stop-daemon -K -p $PIDFILE $DAEMON
         echo "done."
         ;;
     restart)