Proftpd shutting down

Since the update of the rootserver to Ubuntu Saucy I’ve been experiencing strange shutdowns of proftpd. Logfiles only showed :

1
2
2013-12-29 06:25:27,355 zulu203 proftpd[18394] zulu203.server4you.de: ProFTPD killed (signal 15)
2013-12-29 06:25:27,457 zulu203 proftpd[18394] zulu203.server4you.de: ProFTPD 1.3.5rc3 standalone mode SHUTDOWN

Server could then be restarted (service proftpd restart) without any warning or error message.

I finally found the root cause : logrotate, when it rotates the logs, restarts the proftpd daemon. To do this, it issues the command

1
invoke-rc.d proftpd restart

Issuing this command manually on the command line, I see the messages :

1
2
* Stopping ftp server proftpd                    [ OK ] 
* Starting ftp server proftpd                    [ OK ] 

but still no daemon running !

I then found followind bug report, which suggests that the start of the daemon comes too soon after the shutdown, and therefore silently fails. The proposed solution is to replace

1
2
signal stop 1
start

with

1
2
3
signal stop 1
sleep 2
start

in order to let the daemon shut down properly.