#!/bin/sh


if [ $# -eq 1 ]; then

case $1 in --help) 
echo " __________________________________________________________________ "
echo "|                                                                  |"
echo "| OBJECT : Command used to configure remote syslog server          |"
echo "|                                                                  |"
echo "|                                                                  |"
echo "|   COMMAND :netlog <activity> <support> <destination> <port>      |"
echo "|                                                                  |"
echo "|   <activity>             : the name of the activity              |"
echo "|   <support>     list     : udp, tcp                              |"	
echo "|   <destination> list     : a valid ip destination :              |"
echo "|     - ipv4 : xxx.xxx.xxx.xxx                                     |" 
echo "|   <port>                 : a valid IP port number < 65535        |"
echo "|                                                                  |"
echo "|   EXAMPLE : netlog ictaudio udp 172.24.40.189 514                |"
echo "|                                                                  |"
echo "|   Use of a particular activity : all                             |"
echo "|   =============================                                  |"
echo "|   Format: netlog all udp 172.24.40.189 514                       |"
echo "|         --> Redirect all activities to one remote syslog         |"
echo "|             server address with port 514 as communication port   |"
echo "|                                                                  |"
echo "|                                                                  |"
echo "|                 -----------End of Help -----------               |"
echo "|__________________________________________________________________|"
;;
esac       
else

 	 if [ $# -eq 4 ]; then
 	     /usr/bin/ICTApplication/ICTCliGateLite --call LoggerModule:redirect --args $1 $2 $3 $4
       else
         echo "number of parameters invalid !"
     fi
               
         
    
fi
      
