Starting SySAM automatically

StepsConfiguring 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.

  1. Make sure the license.dat file has the correct path for the SYBASE daemon.

  2. 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.

  3. Solaris:

    1. Use a text editor to create a new file, /etc/rc3.d/S17lmgrd.

    2. Add the following lines to /etc/rc3.d/S17lmgrd:

      NoteYou 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'
      
    3. Save /etc/rc3.d/S17lmgrd and exit the text editor.

    4. 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
      

    Mac:

    1. Create the following directory:

      /Library/StartupItems/SybaseLicenseManagerRS
      
    2. In the SybaseLicenseManagerRS directory, create a file of the same name using vi or any text editor:

      cd /Library/StartupItems/SybaseLicenseManagerRS
      vi SybaseLicenseManagerRS
      
    3. 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 
      
    4. Create a second file called StartupParameters.plist in the same directory:

      cd /Library/StartupItems/SybaseLicenseManagerRS
      vi StartupParameters.plist
      
    5. 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";
        };
      		}
      
    6. 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