Hi Gurus,
I have a server that has to users.
1) root
2)net1
there are several processes running on my server
one of the process is CMIS_STACK process which is a compiled C code
when this process goes missing then i restart this process manually in the following manner
su net1(the process can only be started from net1 user)
cd /net1/bin
CMIS_STACK &
and the process starts successfully
now i have written a script that starts the process automatically if it goes missing
i have a process.txt file that contains all the important processes
ps -ax > process.txt
grep "CMIS_STACK" process.txt
if [ $? -ne 0 ]
then
date > error.log
echo "CMIS_STACK not running" >> error.log
su netmon
cd /net1/bin
CMIS_STACK &
echo "process startted successfully" >> error.log
fi
now if i run the above script , it exits without restarting the process. I am not able to figure out , what is the problem.
is this related to the swithching of the users in the script.
please Gurus help me out tosolve this problem
I have to implement this script as soon as possible
Thanks