Backticks execute the command they contain immediately, so you're running the sh command in $com2 unconditionally.
You might be better served by looking at setting up an entry in inittab and let that handle keeping things alive.
We're looking for a Perl and Database Developer for Corporate Investments Group.
In reply to Re: Creating process restart script
by Fletch
in thread Creating process restart script
by redcell184
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |