I am working on a script to automate some process checking and basically want the script to check processes and then if one is not running, start it.
There are several instances of Apache for example that are running for various groups in our company. So I envision a for/each loop. This loop would check each process in turn and then if the ps command returns FAILURE, then it would launch that start command associated with that process.
The question here is: Would the best approach be a couple of arrays with the cmds in them? The way to look at each process on this box is the same save the item we are grepping for.
Help to do this in most efficient way is appreciated.
In reply to Efficient Automation by jmneedhamco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |