LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-16-2003, 06:13 AM   #1
soredz
LQ Newbie
 
Registered: Oct 2003
Distribution: redhat 9
Posts: 2

Rep: Reputation: 0
Question startup scripts for init.d/


Hi!
Where can I find, or how do I write, a startupscript for httpd (apache 1.3x) that is supported by chkconfig. The background is this:
A few days ago I discovered that httpd didn't start on boot. In the /etc/init.d/ katalog I found, besides the file httpd, a file named httpd.lock. I moved it to /tmp/ and then ran > chkconfig --list httpd
I recieved the following output:
Quote:
The service httpd isn't supported by chkconfig
I then looked att the file /etc/init.d/httpd and dicouvered that it was the same as the /usr/local/apache/bin/apachectl .
(I assume it was I who put it there, though I can't remeber having done it. )
In the man page for chkconfig it said that
Quote:
Each service which should be manageable by chkconfig needs two or more commented lines added to its init.d script. The first line tells chk-config what runlevels the service should be started in by default, as well as the start and stop priority levels.
and an example:
Quote:
For example, random.init has these three lines:
# chkconfig: 2345 20 80
# description: Saves and restores system entropy pool for \
# higher quality random number generation.
I tried to put the two lines in the /etc/init.d/httpd but I got the same output from the command:
chkconfig --list httpd

I run Redhat 9 and have installed the rpm version of apache that came with the distro.

TIA
Sören Edzen
 
Old 10-16-2003, 12:08 PM   #2
mlp68
Member
 
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 328

Rep: Reputation: 30
If you think you have the file right, you need to

chkconfig --add httpd

I think your numbers will be like 345 80 20

(start late, stop early in run levels 3,4,5)

mlp
 
Old 10-16-2003, 03:27 PM   #3
soredz
LQ Newbie
 
Registered: Oct 2003
Distribution: redhat 9
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks!
It didn't help at first. But then I realised that the lines refering to chkconfig where too many lines down in httpd file.
soredz
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
init scripts lvgandhi Debian 2 10-11-2005 02:44 AM
New init scripts? xconspirisist Fedora 9 12-09-2004 11:41 AM
How to Debug Init Scripts MQMan Slackware 11 03-09-2004 12:40 PM
Scripts in /etc/rc.d/init.d correro Linux - General 1 03-13-2003 09:47 PM
slack init scripts gui10 Slackware 11 05-15-2002 11:12 AM


All times are GMT -5. The time now is 02:59 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration