8ee1ed6e12
Tue Feb 11 2003 Bill Nottingham <notting@redhat.com> 1.1.3-7 - provide /var/ftp & /var/ftp/pub. obsolete anonftp. Mon Feb 10 2003 Bill Nottingham <notting@redhat.com> 1.1.3-6 - clean up comments in init script (#83962) Wed Jan 22 2003 Tim Powers <timp@redhat.com> - rebuilt Mon Dec 30 2002 Florian La Roche <Florian.LaRoche@redhat.de> - change to /etc/rc.d/init.d for better compatibility Mon Dec 16 2002 Bill Nottingham <notting@redhat.com> 1.1.3-3 - fix initscript perms - fix typo in initscript (#76587) Fri Dec 13 2002 Bill Nottingham <notting@redhat.com> 1.1.3-2 - update to 1.1.3 - run standalone, don't run by default - fix reqs Fri Nov 22 2002 Joe Orton <jorton@redhat.com> 1.1.0-3 - fix use with xinetd-ipv6; add flags=IPv4 in xinetd file (#78410)
92 lines
2.0 KiB
Plaintext
Executable File
92 lines
2.0 KiB
Plaintext
Executable File
|
|
#!/bin/bash
|
|
#
|
|
# vsftpd This shell script takes care of starting and stopping
|
|
# standalone vsftpd.
|
|
#
|
|
# chkconfig: - 60 50
|
|
# description: Vsftpd is a ftp daemon, which is the program \
|
|
# that answers incoming ftp service requests.
|
|
# processname: vsftpd
|
|
# config: /etc/vsftpd/vsftpd.conf
|
|
|
|
# Source function library.
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
# Source networking configuration.
|
|
. /etc/sysconfig/network
|
|
|
|
# Check that networking is up.
|
|
[ ${NETWORKING} = "no" ] && exit 0
|
|
|
|
[ -x /usr/sbin/vsftpd ] || exit 0
|
|
|
|
RETVAL=0
|
|
prog="vsftpd"
|
|
|
|
start() {
|
|
# Start daemons.
|
|
|
|
if [ -d /etc/vsftpd ] ; then
|
|
declare -a sites
|
|
sites=(`ls /etc/vsftpd/*.conf`)
|
|
site_count=${#sites[@]}
|
|
index=0
|
|
|
|
while [ "${index}" -lt "${site_count}" ] ; do
|
|
site=`basename ${sites[${index}]} .conf`
|
|
echo -n $"Starting $prog for $site: "
|
|
( /usr/sbin/vsftpd ${sites[${index}]} &)
|
|
daemon true
|
|
RETVAL=$?
|
|
echo
|
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
|
|
let "index = index + 1"
|
|
done
|
|
else
|
|
RETVAL=1
|
|
fi
|
|
return $RETVAL
|
|
}
|
|
|
|
stop() {
|
|
# Stop daemons.
|
|
echo -n $"Shutting down $prog: "
|
|
killproc $prog
|
|
RETVAL=$?
|
|
echo
|
|
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
|
|
return $RETVAL
|
|
}
|
|
|
|
# See how we were called.
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart|reload)
|
|
stop
|
|
start
|
|
RETVAL=$?
|
|
;;
|
|
condrestart)
|
|
if [ -f /var/lock/subsys/$prog ]; then
|
|
stop
|
|
start
|
|
RETVAL=$?
|
|
fi
|
|
;;
|
|
status)
|
|
status $prog
|
|
RETVAL=$?
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $RETVAL
|