Setting Up License Servers to Run as a Service

To run a UNIX license server as an automatic service on machines running UNIX systems:

  1. Use an account with root privileges to log in to the machine where the SySAM 2 license server is installed.
  2. Create a script for the system to use during start-up and shutdown, using the following example for reference. The purpose of the script is to avoid running the license server with root privileges, which are not required.

    The example script assumes that the license manager (lmgrd) is run as the user sybase, and is installed in the /opt/sybase directory. If necessary, change these parameters to match your installation.

    #!/bin/sh
    #
    SYBUSER=sybase
    SYBASE=/opt/sybase
    SYSAM=$SYBASE/SYSAM-2_0
    case "$1" in
          'start')
                su $SYBUSER -c "echo `date` starting lmgrd
    >> $SYSAM/log/boot.log"
                nohup su $SYBUSER -c "umask 022;
       $SYSAM/bin/sysam start >> $SYBASE/log/boot.log"
                ;;       'stop')
                su $SYBUSER -c "echo `date` stopping lmgrd
    >> $SYSAM/log/boot.log"
                su $SYBUSER -c "$SYSAM/bin/sysam stop -q
    >> $SYSAM/log/boot.log"
                ;;
           *)
               echo "Usage: $0 { start | stop }"
               exit 1
               ;;
    esac
    exit 0
  3. Save the script with a file name and in a directory that is appropriate for your operating system.
    • Solaris – /etc/init.d/sysam.boot

    • Red Hat Linux and IBM – /etc/rc.d/init.d/sysam.boot

    • HP – /sbin/init.d/sysam.boot

  4. Change the script’s read, write, and execute permissions, owner, and group. For example, if the script is stored as /etc/init.d/sysam.boot, enter:
      chmod 744 /etc/init.d/sysam.boot
      chown root /etc/init.d/sysam.boot
      chgrp sys /etc/init.d/sysam.boot
  5. Create an appropriately named link that can be used to start the SySAM 2 license manager when the license server starts (typically, S + run number + script name):
    • Solaris –

      ln -s /etc/init.d/sysam.boot /etc/rc3.d/S70sysam
    • Red Hat Linux and IBM –

      ln -s /etc/rc.d/init.d/sysam.boot /etc/rc.d/rc3.d/S70sysam
    • HP –

      ln -s /sbin/init.d/sysam.boot /sbin/rc3.d/S070sysam

    Choose a run number (70 in the example) that is higher than any required SySAM 2 subsystems (such as networking services), and lower than the run number of any SySAM-enabled products.

  6. Create an appropriately named link that can be used to stop the SySAM 2 license manager when the license server shuts down (typically, K + run number + script name). Choose a run number (02 in the example) that is lower than any required SySAM 2 subsystems (such as networking services), and higher than the run number of any SySAM-enabled products.
    • Solaris –

      ln -s /etc/init.d/sysam.boot /etc/rc2.d/K02sysam
    • Red Hat Linux and IBM –

      ln -s /etc/rc.d/init.d/sysam.boot /etc/rc.d/rc2.d/K02sysam
    • HP –

      ln -s /sbin/init.d/sysam.boot /sbin/rc2.d/K002sysam