| How to set you script to run automatically when UNIX starts |
|
|
|
| Written by Administrator |
| Monday, 10 October 2011 05:45 |
|
Let's say you want to add your script or process to UNIX startup, or even you want to be automatically restarted if someone kills it, so here is how you do it:
1. This is done with the help of inittab . So you can check all the current entries via: lsitab -a 2. Now in order to add your own entry: vi /etc/inittab script_name:2:respawn:/usr/sbin/script_name
The respawn option ensures that if someone kills your process, automatically it will be restarted by OS. |
| Last Updated on Monday, 10 October 2011 06:02 |





