#!/bin/sh
#
# relay_control      ip_relay startup/shutdown script
#
# Version: 1.0     ip_relay/relay_control     7-Feb-2003
#
# info@eflo.net
#
# This script is released under the BSD license 
# (for compatibility with the ip_relay project)
# http://sourceforge.net/projects/iprelay/
#
# Thanks to Rachad ALAO (ralao@venus.org) for writing ip_relay
#


case "$1" in
  start)

        echo "starting up ip_relay services "

        ip_relay 40569 127.0.0.1    4569 9999999 &
        ip_relay 41569 127.0.0.1    4569 9999999 &

        echo "done "
        echo
        ;;

  status)

        echo "current running processes "

        ps -C ip_relay

        echo "Done "
        exit 0
        ;;

  restart|reload)
        $0 stop
        $0 start
        ;;

  stop)
        echo "Shutting down ip_relay services "

        # Turn off IP Forwarding
        kill `ps -C ip_relay -o pid --no-heading`

        echo "Done "

        echo
        ;;
  *)
        echo "Usage: relay_control {start|stop|status|restart|reload}"
        exit 1
esac

exit 0
