1752808 Members
5787 Online
108789 Solutions
New Discussion юеВ

Re: startup services

 
SOLVED
Go to solution
Abubakkar
Frequent Contributor

startup services

i want to start appachy service at the time of booting automaticaly. how to do it. kinly explain steps.
4 REPLIES 4
g3jza
Esteemed Contributor
Solution

Re: startup services

Hi,
according to which default runlevel you have in /etc/inittab, the startup-scripts are executed in /sbin/rcX.d/ . Actually they are just symbolic links to scripts in /sbin/init.d/ .

You can try to make your own script, look at the /sbin/init.d/template file and modify it according to your needs. Then just rename it (S for startup script, K for killing/stopping script + the sequence execution number) and copy it to /sbin/init.d/ and make a symbolic link in /sbin/rcX.d/ , depending in which run-level you want to run the script.

But I think that apache should have it's own startup/shutdown script in /sbin/init.d


Shibin_2
Honored Contributor

Re: startup services

Ismail Azad
Esteemed Contributor

Re: startup services

Hi Abubakkar,

The script you are looking for is /sbin/init.d/hpws_apache .

So the command is /sbin/init.d/hpws_apache start would start the Apache service . The corresponding configuration the script will look at is called as /etc/rc.config.d/hpws_apacheconf where you have a variable called as HPWS_APACHE_START which should be put as 1 in case you want the apache service to start at boot time. Don't forget to assign points

Regards!
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....
James R. Ferguson
Acclaimed Contributor

Re: startup services

Hi:

If you question is more general and is how to write shutdown and startup scripts, read the 'rc(1M)' manpages.

Regards!

...JRF...