on 08-18-2010 6:42 AM
Dear gurus,
How do you configure so that saprouter is automatically launched everytime linux starts?
Thanks for your help.
Best Regards,
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.