Re: flex license manager tempfile predictable name...

From: Roelof JT Jonkman (rjonkmanat_private)
Date: Tue Feb 22 2000 - 18:40:57 PST

  • Next message: John Viega: "ITS4 Version 1.0.1"

    sp00n,
    
    Flex does not need to run as root:
    
    Somewhere on their webpage they have some scripts, I crafted some myself, and
    didn't see a need to run a license manager as root.
    
    In the following script note the use of 'su daemon -c' and relocating the
    log file to somewhere more sensible. (-l blah)
    
    roel
    
    Here is the script:
    
    #!/bin/sh
    #
    # quircky script to start license gumbo
    
    case "$1" in
    'start')
            if [ -x /tools/licenses/bin/lmgrd ] ; then
                    su daemon -c "umask 022; /tools/licenses/bin/lmgrd -c /tools/licenses/keys/license.dat -l /tools/licenses/logs/flexlm.log" &
                    echo "Starting FLEXlm license service."
            fi
            ;;
    'stop')
            if [ -x /tools/licenses/bin/lmutil ] ; then
                    echo "y" | /tools/licenses/bin/lmutil lmdown -c /tools/licenses/keys/license.dat -l /tools/licenses/logs/flexlm.log &
                    echo "Stopped FLEXlm license service."
            fi
            ;;
    'restart')
            if [ -x /tools/licenses/bin/lmutil ] ; then
                    echo "y" | /tools/licenses/bin/lmutil lmreread -c /tools/licenses/keys/license.dat -l /tools/licenses/logs/flexlm.log &
                    echo "Restarted FLEXlm license service."
            fi
            ;;
    'status')
            if [ -x /tools/licenses/bin/lmutil ] ; then
                    /tools/licenses/bin/lmutil lmstat -c /tools/licenses/keys/license.dat
                    echo "Status displayed."
            fi
            ;;
    'hostid')
            if [ -x /tools/licenses/bin/lmutil ] ; then
                    /tools/licenses/bin/lmutil hostid -c /tools/licenses/keys/license.dat
                    echo "Hostid returned."
            fi
            ;;
    *)
            echo "Usage: /etc/init.d/flexlm { start | stop | status | hostid }"
            ;;
    esac
    



    This archive was generated by hypermail 2b30 : Fri Apr 13 2001 - 15:36:50 PDT