During restart vsftpd daemon isn't killed, thus vsftpd refuses to start Reproducible: Always Actual Results: # /etc/init.d/vsftpd restart * Caching service dependencies ... [ ok ] * Stopping vsftpd ... * start-stop-daemon: no matching processes found [ ok ] * Starting vsftpd ... * start-stop-daemon: /usr/sbin/vsftpd is already running [ !! ] * ERROR: vsftpd failed to start Expected Results: # /etc/init.d/vsftpd restart * Stopping vsftpd ... [ ok ] * Starting vsftpd ... [ ok ] After changing stop() function in /etc/init.d/vsftpd to stop() { ebegin "Stopping ${SVCNAME}" start-stop-daemon --stop --exec /usr/sbin/vsftpd \ --pidfile "${VSFTPD_PID}" \ -- "${VSFTPD_CONF}" eend $? } it restarts properly.
Created attachment 163613 [details] Fixed vsftpd init script [test] arko j0inty # vi /etc/init.d/vsftpd arko j0inty # /etc/init.d/vsftpd start * Caching service dependencies ... * Service 'metalog' already provides 'logger'!; * Not adding service 'syslog-ng'... [ ok ] * Starting vsftpd ... [ ok ] arko j0inty # /etc/init.d/vsftpd restart * Stopping vsftpd ... [ ok ] * Starting vsftpd ... [ ok ] arko j0inty # /etc/init.d/vsftpd stop * Stopping vsftpd ... [ ok ] arko j0inty # /etc/init.d/vsftpd start * Starting vsftpd ... [ ok ] arko j0inty # rm -vf /var/run/vsftpd.pid „/var/run/vsftpd.pid“ entfernt arko j0inty # /etc/init.d/vsftpd restart * Stopping vsftpd ... * Couldn't found /var/run/vsftpd.pid trying to stop over the process name vsftpd [ ok ] * Starting vsftpd ... [ ok ] arko j0inty #
Works for me as of vsftpd-2.0.6 and baselayout-1.12.11.1. I also have this in /etc/init.d/vsftpd: stop() { ebegin "Stopping ${SVCNAME}" start-stop-daemon --stop --exec /usr/sbin/vsftpd \ --pidfile "${VSFTPD_PID}" eend $? }
(In reply to comment #2) It seems that vsftpd-2.0.7 has a wrong stop command, it's not like the one you pasted. It was missing the --pidfile part which was a huge problem with more then one vsftpd instance. > Works for me as of vsftpd-2.0.6 and baselayout-1.12.11.1. I also have this in > /etc/init.d/vsftpd: > > stop() { > ebegin "Stopping ${SVCNAME}" > start-stop-daemon --stop --exec /usr/sbin/vsftpd \ > --pidfile "${VSFTPD_PID}" > eend $? > } >
Fixed on -r1, thanks for the script.