hm1974
7th October 2002, 12:12
Hi all,
we are using hpux11.00, Triton 3.1, oracle 7.3.4.4.
we want automatically restart the licd6.1 daemon at night.
Could anyone post an example script for that problem?
Thanks in advance.
Greetings
HM
logantech
7th October 2002, 20:38
Hi HM,
Check out the scripts rc.start and rc.shutdown.
evertsen
7th October 2002, 21:19
rc.start and rc.stop are used to start and stop Baan. For just rebooting the licence daemon, we use this in a crontab that runs every night:
/baan/bse/bin/licmon6.1 -k; sleep 60; /baan/bse/bin/licd6.1
Ev
victor_cleto
8th October 2002, 21:46
I think what logantech mentioned is to check the contents of those scripts, since they would have provided the answer by examining how the licd6.1 is started and stopped.
Just make sure you run the restart mentioned as root.
logantech
9th October 2002, 06:33
Thanks, Victor. I'm glad someone was able to understand me.:D
Old Vens
9th October 2002, 07:16
I think sleep 60 can sometimes be not enough for licmon6.1 -k - you can get an error while running licd6.1 after it. To my opinion it's better wait (sleep) 3-5 minutes or even more.
evertsen
9th October 2002, 07:18
Sorry logantech, I was wicked tired when I wrote that post and was not at my best, reasoning like. I'm much better now.:)
Ev
NPRao
9th October 2002, 09:02
Please use the search option for reference on the board to find some useful links like -
Restart Licence Deamon (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=5451&highlight=shutdown)
Problem with loading Runtime DD (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=1853&highlight=shutdown)
hm1974
9th October 2002, 10:50
HI,
another question:
Must I set a specific environment in my restart-script?
Greetings
HM
patvdv
9th October 2002, 11:31
Here's an example of a function to stop/start licd:
restart_licd()
{
# restart Baan License daemon
LIC_DAEMON_ACTIVE=$(ps -ef | egrep -i [l]icd6.1)
if [ -n "${LIC_DAEMON_ACTIVE}" ]
then
LIC_DAEMON_PID=$(echo ${LIC_DAEMON_ACTIVE} | awk '{print $2}')
kill -9 ${LIC_DAEMON_PID}
fi
sleep 120
COUNT=0
while [ $(ps -ef | egrep -i [l]icd6.1 | wc -l) -eq 0 -o ${COUNT} -lt 3 ]
do
${BSE}/etc/rc.start_licd >&- 2>&- & >/dev/null 2>&1
sleep 60
COUNT=$((${COUNT}+1))
done
if [ $(ps -ef | egrep -i [l]icd6.1 | wc -l) -eq 0 -a ${COUNT} -eq 3 ]
then
RUN_ERROR=1
else
RUN_ERROR=0
fi
return ${RUN_ERROR}
}
Adapt it to your own needs of course :) Just make sure $BSE is set.