Here’s a workaround solution thanks to https://bugs.launchpad.net/ubuntu/+source/proftpd-dfsg/+bug
The problem is due to ProFTPD not stopping in time to be restarted.
The workaround is to edit the service file, to add a retry.
/etc/init.d/proftpd
Find this line (inside “signal” procedure):
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"
Change to this:
start-stop-daemon --stop --signal $SIGNAL --retry 1 --quiet --pidfile "$PIDFILE"
This change solved it for me. Suggestions for improvements are most welcome.
install & renew certificate
ssh-keygen -m PEM -f /etc/proftpd/ssh_host_rsa_key -N ” -t rsa -b 2048
ssh-keygen -m PEM -f /etc/proftpd/ssh_host_dsa_key -N ” -t dsa -b 1024
ssh-keygen -m PEM -f /etc/proftpd/ssh_host_ecdsa_key -N ” -t ecdsa -b 521