enthuguy
asked on
Setting up auto-startup when OS starts up or reboot on Linux
Hi,
Would like to configure auto-startup on few process on linux OS. Could you suggest detailed steps please
Scenario is, I have few applications running on Linux which has dependencies between them (Parent, child, grand child). So when OS reboots/starts....would like to
1. start parent app first
2 wait for parent to be running, then start child app
3 wait for child to be running, then start grand-child app.
Also similar for graceful shutdown
Thanks in advance
Would like to configure auto-startup on few process on linux OS. Could you suggest detailed steps please
Scenario is, I have few applications running on Linux which has dependencies between them (Parent, child, grand child). So when OS reboots/starts....would like to
1. start parent app first
2 wait for parent to be running, then start child app
3 wait for child to be running, then start grand-child app.
Also similar for graceful shutdown
Thanks in advance
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Once you create the script and run it successfully as per your wishes, you will have to add a symlink of it in the folder of your run level like rc3.d or rc5.d. This is done with a simple command but that command is different with different distributions.
ASKER
Hi Farzanj, Thanks for your quick comment.
To be precise...I run Oracle Enterprise Linux 5.x
Above sample script would work for me?
To be precise...I run Oracle Enterprise Linux 5.x
Above sample script would work for me?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It should work for you. If you include all the three processes in the same startup script, you will have the control over the start and end order of processes.
Sorry, grandchild app should have:
chkconfig: 2345 57 23
You get the idea though :)
chkconfig: 2345 57 23
You get the idea though :)
ASKER
Awesome!!
You have to create a /etc/rc.d kind of script. This would start it in the order you mentioned. Will also shut in the correct order.