#!/bin/sh
#
# frox		Starts/stops Frox ftp proxy         
#
# chkconfig: 2345 55 10
# description: Frox ftp proxy

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0


# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n "Starting Frox ftp proxy: "
        daemon frox -f /etc/frox.conf
        echo
        touch /var/lock/subsys/frox
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting Frox ftp proxy: "
	killproc frox
        echo
        rm -f /var/lock/subsys/frox
        ;;
  status)
	status frox
	;;
  restart)
	$0 stop
	$0 start
	;;
  reload)
	$0 stop
	$0 start
	;;
  condrestart)
    if [ -f /var/lock/subsys/frox ]; then
        $0 stop
        $0 start
    fi
    ;;
  *)
        echo "Usage: frox {start|stop|restart|status}"
        exit 1
esac

exit 0
