Skip to Content
avatar image
Former Member

SAPRouter Autostart on Startup

Dear gurus,

How do you configure so that saprouter is automatically launched everytime linux starts?

Thanks for your help.

Best Regards,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 18, 2010 at 06:13 AM

    Hi,

    Create a shell script with the command to start the SAPRouter and set it as one of the startup services. Make sure that the Router service is started with the Router user by including su -<Router User> in the script.

    Regards,

    Varadharajan M

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 18, 2010 at 07:33 AM

    Hi,

    Here is an example script I created for Suse Linux Enterprise Server:

    sidadm@hostname:~> cat /etc/init.d/saprouter

    #! /bin/sh
    #
    . /etc/rc.status
    
    PATH=/sbin:/bin:/usr/sbin:/usr/bin; export PATH
    LOGFILE="/usr/sap/saprouter/saprouter.log"
    EXEDIR="/sapmnt/<SID>/exe"
    SRDIR="/usr/sap/saprouter"
    
    # Reset status of this service
    rc_reset
    
    case "$1" in
        start)
    	echo -n "Starting saprouter"
    
            if [ -f $EXEDIR/saprouter ] ; then
    
              $EXEDIR/saprouter -G $LOGFILE -r -W 30000 -R $SRDIR/saprouttab >> $LOGFILE &
    
            fi
    
    	# Remember status and be verbose
    	rc_status -v
    	;;
        stop)
    	echo -n "Stopping saprouter"
    
              $EXEDIR/saprouter -s
    
    	# Remember status and be verbose
    	rc_status -v
    	;;
       check)
              $EXEDIR/saprouter -l
            ;;
     restart)
    	 ## Stop the service and regardless of whether it was
    	 ## running or not, start it again.
    	   $0 stop
    	   $0 start
    
    	 # Remember status and be quiet
    	rc_status
    	;;
        *)
    	echo "Usage: $0 {start|stop|check|restart}"
    	exit 1
    	;;
    esac
    rc_exit
    

    Adjust to your liking.

    Nelis

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi Nelis

      we have sles 11.4 and we are trying to run sap router as a service. i had followed your init.d file.

      stop and check are working but start is not we are trying to establish snc connection using a system user.

      do you have a sample for SNC connection please share

      sorry for the noop question