I learned to write the Linux Startup Script-general Linux technology-Linux programming and kernel information. The following is a detailed description. The pure-ftpd on the FTP server is compiled by itself (to support utf8-> gb2312), so that you cannot enjoy the automatic configuration of debian. The result is that pure-ftpd must be started manually every time the machine is restarted. I changed the hard disk after-sales service yesterday (the hard disk is broken again, and the warranty is about to expire soon). I still need to manually start pure-ftpd when I start the system today, I found a configuration file on the internet (but failed to find a better management solution by the way:
CODE: ftp :~ # Cat/etc/init. d/pure-ftpd
#! /Bin/sh
Case "$1" in
Start)
Echo "Starting Pure-ftpd ..."
If [-f/usr/local/pureftpd/etc/pure-ftpd.conf]; then
/Usr/local/pureftpd/bin/pure-config.pl/usr/local/pureftpd/etc/pure-ftpd.conf>/dev/null
/Usr/local/pureftpd/sbin/pure-uploadscript-r/usr/local/pureftpd/etc/uploadScript. sh>/dev/null &
Echo "Pure-ftpd Started ..."
Else
Echo "Pure-ftpd Configure File Not Found"
Fi
;;
Stop)
Echo "Stoping Pure-ftpd ..."
Killall pure-ftpd>/dev/null
Killall pure-uploadscript>/dev/null
Echo 'ure-ftpd stoped'
;;
*)
Echo "Usage: 'basename $ 0' {start | stop }"
Exit 1
;;
Esac
Exit 0 |