Hi All,
My OS is redhat 7.1. How can I start my own service (e.g. simple scripts) when the system is started?
I found something like /etc/rc.d, /etc/rc.init ...
But I have no idea on them, have anyone can help me?
regards
wilson
Hi All,
My OS is redhat 7.1. How can I start my own service (e.g. simple scripts) when the system is started?
I found something like /etc/rc.d, /etc/rc.init ...
But I have no idea on them, have anyone can help me?
regards
wilson
/etc/rc0.d is the area used when shutting down the server
/etc/rc2.d is the area used on bootup
All you need to do, is to add you script in the /etc/rc2.d area.
lets say you call the scripts S98start
On bootup it will read your start and start whatever you are planning to run
then to stop whatever you have started (if needed) you can then create another script called /etc/rc0.d/K98stop todo the reverse of S98start.
i hope makes sense.
The easiest way in Redhat is to add a line to /etc/rc.d/rc.local
It's just a text file that's run like a script. Make sure to add error handling, so you don't screw something up while booting if your file doesn't exist or is not executable...
how about for others like hpux, aix
AIX is using rc.local .....
HP is using /etc/rc2.d (i think, iam not sure about HP)
thanks, janr...
i couldnt find those files..
i even do a find /, ya... to confirm the location of these files..
HP-UX depends on the version.