Configuring SySAM to start automatically when
the server is restarted
These instructions are for Solaris and Mac. For instructions on how to start custom applications automatically for other platforms, see the documentation for your operating system.
Make sure the license.dat file has the correct path for the SYBASE daemon.
Using an account with “root” privileges, log in to the machine where you installed the asset management software. On a Mac, use the sudo su command.
Use a text editor to create a new file, /etc/rc3.d/S17lmgrd.
Add the following lines to /etc/rc3.d/S17lmgrd:
You must know the name of both the Sybase release directory as
well as the Sybase SySAM release directory.
SYBASE=<Sybase reldir> SYBASE_SYSAM=<SySam rel> #<SySAM rel> should be SYSAM-1_0 for instance /bin/su user_name -c 'echo starting lmgrd> \ $SYBASE/$SYBASE_SYSAM/bin/boot.log' /bin/nohup /bin/su user_name -c 'umask 022; \ $SYBASE/$SYBASE_SYSAM/bin/lmgrd -c \ $SYBASE/$SYBASE_SYSAM/licenses/license.dat -l \ $SYBASE/$SYBASE/$SYBASE_SYSAM/log/lmgrd.log >> \ $SYBASE/$SYBASE_SYSAM/log/boot.log'\ /bin/su user_name -c 'echo sleep 5>> \ $SYBASE/$SYBASE_SYSAM/bin/boot.log' /bin/sleep 5 /bin/su user_name -c 'echo lmdiag >> \ $SYBASE/$SYBASE_SYSAM/bin/boot.log' /bin/su user_name -c '$SYBASE/$SYBASE_SYSAM/bin/lmutil lmdiag -n -c \ $SYBASE/$SYBASE_SYSAM/bin/license.dat>> \ $SYBASE/$SYBASE_SYSAM/bin/boot.log' /bin/su user_name -c 'echo exiting >> \ $SYBASE/$SYBASE_SYSAM/bin/boot.log'
Save /etc/rc3.d/S17lmgrd and exit the text editor.
Change the permissions, ownership, and group for /etc/rc3.d/S17lmgrd by entering:
chmod 744 /etc/rc3.d/S17lmgrd chown root /etc/rc3.d/S17lmgrd chgrp sys /etc/rc3.d/S17lmgrd
Create the following directory:
/Library/StartupItems/SybaseLicenseManagerRS
In the SybaseLicenseManagerRS directory, create a file of the same name using vi or any text editor:
cd /Library/StartupItems/SybaseLicenseManagerRS vi SybaseLicenseManagerRS
In the SybaseLicenseManagerRS file, insert the following text:
#!/bin/sh ## # Start Sybase Replication License Manager for RS ## . /etc/rc.common set +u . /Applications/Sybase/ReplicationServer126/SYBASE.sh ConsoleMessage "Starting Sybase License Manager for RS" umask 002 $SYBASE/SYSAM-1_0/bin/startd.sh
Create a second file called StartupParameters.plist in the same directory:
cd /Library/StartupItems/SybaseLicenseManagerRS vi StartupParameters.plist
In the StartupParameters.plist file, insert the following text:
{ Description = "Sybase License Manager for RS"; Provides = ("Sybase License Manager for RS"); Requires = ("Disks", "Resolver"); Uses = ("Network Time"); OrderPreference = "None"; Messages = { start = "Starting Sybase License Manager for RS"; stop = "Stopping Sybase License Manager for RS"; }; }
Change the owner and permissions of the two files you created:
cd /Library/StartupItems/SybaseLicenseManagerRS /usr/sbin/chown root SybaseLicenseManagerRS /usr/sbin/chown root StartupParameters.plist /bin/chmod +x SybaseLicenseManagerRS