#!/bin/sh # # frox FROX # # chkconfig: 2345 90 25 # description: FROX Transparent FTP proxy # Source function library . /etc/rc.d/init.d/functions # See how we were called. case "$1" in start) # Check if the service is already running? if [ ! -f /var/lock/subsys/frox ]; then msg_starting frox daemon frox -f /etc/frox.conf RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/frox else msg_Already_Running frox exit 1 fi ;; stop) # Stop daemons. if [ -f /var/lock/subsys/frox ]; then msg_stopping frox killproc frox rm -f /var/lock/subsys/frox /var/run/frox.pid >/dev/null 2>&1 else msg_Not_Running frox exit 1 fi ;; status) status frox exit $? ;; restart|reload) $0 stop $0 start ;; *) msg_Usage "$0 {start|stop|restart|status}" exit 1 ;; esac exit $RETVAL