Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 83 lines (69 sloc) 1.18 KB
#! /bin/sh
#
# aftpd Allegro FTP daemon
#
# chkconfig: - 99 01
# description: FTP server
# processname: aftpd
# config: /etc/aftpd.cl
installdir=/usr/sbin
# Source function library.
. /etc/init.d/functions
# Get config.
if [ -f /etc/sysconfig/network ]
then
. /etc/sysconfig/network
else
echo $"Networking not configured - exiting"
exit 1
fi
prog="Allegro FTP daemon"
# Check that networking is up.
if [ "$NETWORKING" = "no" ]
then
exit 0
fi
[ -f $installdir/aftpd ] || exit 0
RETVAL=0
start() {
echo -n $"Starting $prog: "
daemon $installdir/aftpd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/aftpd
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc aftpd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/aftpd
return $RETVAL
}
restart() {
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status aftpd
;;
restart|reload)
restart
;;
condrestart)
[ -f /var/lock/subsys/aftpd ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
exit 1
esac
exit $?
Jump to Line
Something went wrong with that request. Please try again.