Operating System - HP-UX
1824988 Members
1908 Online
109678 Solutions
New Discussion юеВ

Re: running a script from inittab

 
SOLVED
Go to solution
Janet White
Advisor

running a script from inittab

I am in a bind and a hurry, I have an outside vendor running a c script to manipulate data and move it. They prefer to have it run out of inittab since it sleeps and wakes up and looks for files. Does anyone know how to do this? The script and sourcefile are in /usr/local/bin, and I would need to cd to /usr/local/bin then run the job as the srcfile is called from the job not with a full path name. I don't know how much if any of this makes sense, but it is one of those weeks where I am in training and my regular job to do too and I need help! Thank you for your time. btw hpux11.11
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: running a script from inittab

First do a man inittab; it's all rather self-explanatory. The only thing that may not be clear is that the action field should be "respawn". Each time your process terminates (ie the sleep ends) it will terminate and init will automatically restart the process. Make sure that all needed environment variables such as PATH are explicitly set in the script itself because the environment will be very sparse.
Once you edit inittab and add your entry; issue and "init q" command so that init will reread inittab and process your new entry.
If it ain't broke, I can fix that.
Janet White
Advisor

Re: running a script from inittab

perfect, thank you