Hi all, many thanks for your help. This list is very helpful. Bellow my
original question and the solution:
> Hi Managers,
>
> When I insert an entry in the /etc/inittab file with the respawn
> action it doesn't works because the command needs an environment variable.
> So, when I insert a script with this variable, the respawn action doesn't
> work (if the process dies the system doesn't reactivate). Is there any way
> to make this or only with the crontab???
> Thanks a lot,
>
> Debora.
In the /etc/inittab file:
teste:3:respawn:/home/netfloor/teste-crm/initassinanted2.sh
In my script, I have to put the "exec" before my command, and I have to take
off the BACKGROUND symbol "&":
#!/bin/sh
# Script para inicializacao dos processos NetFloor
#
# Inicialmente, todos os paths estarao hardcoded,
#
echo 'Starting Switch Custumer Access Interface' >
/home/netfloor/teste-crm/teste.log
NETFLOOR_CFG_DIR=/home/netfloor/teste-crm ; export NETFLOOR_CFG_DIR
#exec /home/netfloor/teste-crm/assinanted2 &
exec /home/netfloor/teste-crm/assinanted2
echo 'done' >> /home/netfloor/teste-crm/teste.log
Received on Mon Nov 27 2000 - 17:44:55 NZDT