|
So You Want to Run VSFTPD Using DaemonTools! After discovering the beauty of Mr. Bernsteins daemontools - when I was learning about qmail - I decided to use it with vsftpd as well. I just thought I would jot down a quick note for anyone that plans on using daemontools with vsftpd. I initially had some issues getting the daemontools "svc" command to properly terminate the vsftpd process. svc -d /service/vsftpd/ svc -d -k /service/vsftpd/ svc -d -t /service/vsftpd/ None of the above commands would successfully kill vsftpd! Svscan and supervise had no issues starting and restarting a terminated vsftpd process but I could not terminate the running vsftpd process using svc. My simple run file in /service/vsftpd/run originally looked like this: ========================== #!/bin/sh /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf ========================== This run script alone is enough to make svc -d not work correctly. You have to launch the program using "exec" in order to make that program run in the same shell that the ./run file is originally launched in. Don't stop reading yet!! With vsftpd it is by default configured to background itself. If it backgrounds then it will not terminate correctly using svc. To use vsftpd with daemontools you must tell it too not background. echo 'background=NO' >> /etc/vsftpd/vsftpd.conf To Conclude: background=NO and use exec in all your /service/*/run files! |