The ansys license manager is run under user "licence", its installed in the directory /home/licence/ansys_inc/.
In
/home/licence/ansys_inc/shared_files/licensing/init_ansysli :change
ANSYSLIC_DIR="/home/licence/ansys_inc/shared_files/licensing"
The init_ansli script is going to be linked to /etc/init.d
The start script will keep the old log files in the time stamped copies.
/home/licence/ansys_inc/shared_files/licensing/start_ansysli :
#!/bin/sh
#
LMGRD="${ANSYSLIC_DIR}/lin32/lmgrd"
# Self-locate
selfdir="`dirname $0`"
# Does licsh.ini exist?
if test -r "${selfdir}/lic_admin/licsh.ini"; then
. ${selfdir}/lic_admin/licsh.ini
if test -x "${ANSYSLIC_DIR}/${ANSYSLIC_SYSDIR}/ansysli_server"; then
su licence -c "date >> ${ANSYSLIC_DIR}/ansyslic.start.log"
su licence -c "${ANSYSLIC_DIR}/${ANSYSLIC_SYSDIR}/ansysli_server < /dev/null"
mv -f ${ANSYSLIC_DIR}/license.log ${ANSYSLIC_DIR}/license.log-`date +"%F+%T"`
su licence -c "${LMGRD} -c ${ANSYSLIC_DIR}/license.dat -l ${ANSYSLIC_DIR}/license.log >>${ANSYSLIC_DIR}/ansyslic.start.log 2>&1"
else
echo "ERROR: '${ANSYSLIC_DIR}/${ANSYSLIC_SYSDIR}/ansysli_server' cannot be executed."
echo "Cannot start the ANSYS, Inc. License Manager."
exit 1
fi
else
echo "ERROR: '${selfdir}/lic_admin/licsh.ini' is not readable."
echo "Cannot start the ANSYS, Inc. License Manager."
exit 1
fi
exit 0
The shutdown script is almost untouched. Just stop explicitly the flexlm.
/home/licence/ansys_inc/shared_files/licensing/stop_ansysli :
#!/bin/sh
#
LMGRD="${ANSYSLIC_DIR}/lin32/lmutil"
# Self-locate
selfdir="`dirname $0`"
# Does licsh.ini exist?
if test -r "${selfdir}/lic_admin/licsh.ini"; then
. ${selfdir}/lic_admin/licsh.ini
if test -x "${ANSYSLIC_DIR}/${ANSYSLIC_SYSDIR}/ansysli_server"; then
exec ${ANSYSLIC_DIR}/${ANSYSLIC_SYSDIR}/ansysli_server -k stop
exec ${LMGRD} lmdown -c ${ANSYSLIC_DIR}/license.dat -force >>${ANSYSLIC_DIR}/ansyslic.start.log 2>&1
else
echo "ERROR: '${ANSYSLIC_DIR}/${ANSYSLIC_SYSDIR}/ansysli_server' cannot be executed."
echo "Cannot stop the ANSYS, Inc. License Manager."
exit 1
fi
else
echo "ERROR: '${selfdir}/lic_admin/licsh.ini' is not readable."
echo "Cannot stop the ANSYS, Inc. License Manager."
exit 1
fi
exit 0
Žádné komentáře:
Okomentovat