To run a UNIX license server as an automatic service on machines running UNIX systems:
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
chmod 744 /etc/init.d/sysam.boot chown root /etc/init.d/sysam.boot chgrp sys /etc/init.d/sysam.boot