Bug#675081: proftpd-basic: logrotate kills proftpd instead of restarting it

Joe Emenaker joe at emenaker.com
Thu Aug 1 16:38:17 UTC 2013


> Maybe we should tell start-stop-daemon to wait 'forever' until the process
> is really dead before we restart it?
>
> According to start-stop-daemon(8), the options should be:
>
> start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE" --retry=TERM/10/KILL/forever

I just had this bug start happening to me, and it happens even without logrotate being involved. Just running:

   /etc/init.d/proftpd restart

gives:

   [ ok ] Stopping ftp server: proftpd.
   [ ok ] Starting ftp server: proftpd.

but proftpd doesn't really get started. There's not even any mention of it *trying* to start in /var/log/proftpd/proftpd.log;
only the messages related to shutdown. (So, I'm not getting the "Failed binding to 0.0.0.0, port 21: Address already in use"
messages that David was getting).

The strange this is that I *do* have the "--retry=TERM/10/KILL/5" option in /etc/init.d/proftpd, yet the "Starting..."
line appears almost instantly. The "--retry=TERM/10/KILL/5" should be causing start-stop-daemon to wait until the process ends,
but, like I said, it's returning almost instantly (which is what I'd expect, as I'm trying this without any open FTP connections
and with a loadavg of about 0.01).

Putting the "sleep 2" in the case statement in /etc/init.d/proftpd script *did* fix the issue for me, however.

This is with ProFTPD 1.3.5rc3, BTW...



More information about the Pkg-proftpd-maintainers mailing list