I needed to setup 2 instances of VSFTPD. So I created a 2nd conf fileapp
/etc/vsftpd-2.conf
and a 2nd init scriptcode
/etc/init.d/vsftpd-2
I edited the contents of /etc/vsftpd-2.conf to include the following lineserver
listen_port=1123.
I also needed to edit the /etc/init.d/vsftpd-2 file so when the start-stop-daemon is starting up the application, it uses a different pid & a different vsftpd conf file.ip
Below are some excerpts from the /etc/init.d/vsftpd-2 file:it
CONFIG2FILE="/etc/vsftpd-2.conf" #DAEMON="/usr/sbin/vsftpd ${CONFIG2FILE}" DAEMON="/usr/sbin/vsftpd" ARGS="$CONFIG2FILE" NAME="vsftpd-2" PATH="/sbin:/bin:/usr/sbin:/usr/bin" LOGFILE="/var/log/vsftpd.log" CHROOT="/var/run/vsftpd-2/empty" CONFFILE="${CONFIG2FILE}" case "${1}" in start) Check_standalone_mode || exit 0 echo -n "Starting FTP server: " start-stop-daemon --start --background -m --oknodo --pidfile /var/run/vsftpd/vsftpd2.pid --exec ${DAEMON} -- ${ARGS} echo "${NAME}." ;; reload|force-reload) echo "Reloading FTP server configuration: " start-stop-daemon --stop --pidfile /var/run/vsftpd/vsftpd2.pid --signal 1 --exec $DAEMON -- ${ARGS} echo "${NAME}." ;;