Magellan Linux

Annotation of /trunk/vsftpd/vsftpd.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 869 - (hide annotations) (download)
Sun Jul 12 22:32:30 2009 UTC (15 years, 3 months ago) by niro
File size: 1132 byte(s)
-rc config moved to /etc/conf.d

1 niro 153 #!/bin/sh
2    
3     #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k
4     #%start: 23
5     #%stop: 47
6    
7     #deps
8     #%needs:
9     #%before:
10     #%after:
11    
12 niro 869 source /etc/conf.d/rc
13 niro 153 source $rc_functions
14    
15    
16     if [ ! -e /etc/vsftpd.conf ]
17     then
18     echo
19     echo -e ${COLYELLOW}"Please setup your /etc/vsftpd.conf. Aborted."
20     echo
21    
22     exit 1
23     else
24     source /etc/vsftpd.conf
25     if [ "${listen}" != "YES" -o "${background}" != "YES" ]
26     then
27     echo
28     echo -e ${COLYELLOW}"Please setup vsftpd for standalone mode,"
29     echo -e ${COLYELLOW}"or start it via (x)inetd. Aborted."
30     echo
31    
32     exit 1
33     fi
34     fi
35    
36    
37    
38     case "$1" in
39     start)
40     echo -e ${COLOREDSTAR}"Starting vsftpd daemon ..."
41     start-stop-daemon --start --quiet \
42     --exec /usr/sbin/vsftpd /etc/vsftpd.conf
43     evaluate_retval
44    
45     update_svcstatus $1
46     splash svc_started "$(basename $0)" 0
47     ;;
48    
49     stop)
50     echo -e ${COLOREDSTAR}"Stopping vsftpd daemon ..."
51     start-stop-daemon --stop --quiet --exec /usr/sbin/vsftpd
52     evaluate_retval
53    
54     update_svcstatus $1
55     splash svc_stopped "$(basename $0)" 0
56     ;;
57    
58     restart)
59     $0 stop
60     sleep 1
61     $0 start
62     ;;
63    
64     status)
65     statusproc vsftpd
66     ;;
67    
68     *)
69     echo "Usage: $0 {start|stop|restart|status}"
70     exit 1
71     ;;
72     esac