cancel
Showing results for 
Search instead for 
Did you mean: 

SAPRouter Autostart on Startup

Former Member
0 Kudos

Dear gurus,

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

Thanks for your help.

Best Regards,

Accepted Solutions (0)

Answers (2)

Answers (2)

nelis
Active Contributor
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Gurus,

I don't know where to set the services / startup in linux.

For the shell script, I've got it already.

Former Member
0 Kudos

Hi,

Simple way is to add command to start the router script in /etc/rc.local

Edit /etc/rc.local file and add the below line

/bin/sh /path/to/router_script.sh

See the below link for details:

[http://www.linux.com/archive/feature/114107|http://www.linux.com/archive/feature/114107]

Regards.

Rajesh Narkhede