I learned to write the Linux Startup Script.

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.