Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

need opinions about startup script

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Apache : how to set a limit of "X" file..  
Author Message
langford

External


Since: Aug 22, 2003
Posts: 4



(Msg. 1) Posted: Wed Sep 15, 2004 11:38 pm
Post subject: need opinions about startup script
Archived from groups: alt>apache>configuration (more info?)

I'm setting up Apache 1.3.31, on a Fedora 2 system, and I've got
a question about the system startup scripts. Apache didn't come
with a file to put in /etc/init.d/, so I snagged one off an older
machine with some version of Red Hat, and modified it to fit.

Here's the issue: it seems to me that this startup script should
call apachectl to do the real work, instead of reimplementing it.
But I've searched for and found many examples of apache startup
files, and NONE of them do that -- they all ignore apachectl.

I've learned over the years that this situation will eventually
lead to some hard-to-find problem. If the system starts automatically
one way, and manually another way, it's harder to be SURE that
they are the same.

So, why don't people use apachectl in their system startup scripts?
--
Bob Langford, Silicon Masters Consulting, Inc.
langford.TakeThisOut@silicon-masters.com http://www.silicon-masters.com/
phone: 804-674-1253 fax: 804-745-7803

 >> Stay informed about: need opinions about startup script 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Thu Sep 16, 2004 7:36 am
Post subject: Re: need opinions about startup script [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2004-09-16, Bob Langford <langford.TakeThisOut@silicon-masters.com> wrote:
 > I've learned over the years that this situation will eventually
 > lead to some hard-to-find problem.

I've never had any problem, but if you really want, why don't you
just link apachectl as startup script instead of rewriting it?

Davide

--
Once at a social gathering, Gladstone said to Disraeli, "I predict,
Sir, that you will die either by hanging or of some vile disease".
Disraeli replied, "That all depends upon whether I embrace your
principals or your mistress".<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: need opinions about startup script 
Back to top
Login to vote
dinges_danges_

External


Since: Aug 03, 2004
Posts: 88



(Msg. 3) Posted: Fri Sep 17, 2004 11:24 pm
Post subject: Re: need opinions about startup script [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Bob Langford said the following on 16/09/2004 02:38:

 > Here's the issue: it seems to me that this startup script should
 > call apachectl to do the real work, instead of reimplementing it.

Why? apachectl is just a wrapper. You could say that it's the other way
around (apachectl reimplementing the apache start/stop script).

 > But I've searched for and found many examples of apache startup
 > files, and NONE of them do that -- they all ignore apachectl.

The only daemon that does that (which I know off) is sendmail (at least
on a Debian system), but, ofcourse, sendmail is not Apache.

 > I've learned over the years that this situation will eventually
 > lead to some hard-to-find problem. If the system starts automatically

Can you give an example? I've administered a few Apache boxes on
different platforms and have never encountered a problem with this.

 > one way, and manually another way, it's harder to be SURE that
 > they are the same.

I see what you mean and theoretically you're right. Still, I've not had
problems with it.

 > So, why don't people use apachectl in their system startup scripts?

There are differences in start/stop scripts and wrapper scripts, where
the latter usually has more options. The start/stop scripts are usually
run by /etc/init.d/rc (or something like that), which is controlled by
init, whereas a wrapper script is more a "user" (instead of "daemon") thing.

For Apache the difference might be very little, but there are a few
start/stop scripts which have to run when /usr (and thereby /usr/bin and
/usr/sbin) are not yet mounted (or already u(n)mounted in case of going
down).

You might want to symlink the start/stop script to apachectl as Davide
pointed out (not that he really suggested it), but that may raise other
problems and I would recommend against it.

--
Regards
Harrie<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: need opinions about startup script 
Back to top
Login to vote
langford

External


Since: Aug 22, 2003
Posts: 4



(Msg. 4) Posted: Mon Sep 20, 2004 2:11 am
Post subject: Re: need opinions about startup script [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <414b2be8$0$21106$e4fe514c@news.xs4all.nl>,
dinges_danges_donges.RemoveThis@hotmail.com says...
 > Bob Langford said the following on 16/09/2004 02:38:
 >
  > > Here's the issue: it seems to me that this startup script should
  > > call apachectl to do the real work, instead of reimplementing it.
 >
 > Why? apachectl is just a wrapper. You could say that it's the other way
 > around (apachectl reimplementing the apache start/stop script).
 >
  > > But I've searched for and found many examples of apache startup
  > > files, and NONE of them do that -- they all ignore apachectl.
 >
 > The only daemon that does that (which I know off) is sendmail (at least
 > on a Debian system), but, ofcourse, sendmail is not Apache.
 >
  > > I've learned over the years that this situation will eventually
  > > lead to some hard-to-find problem. If the system starts automatically
 >
 > Can you give an example? I've administered a few Apache boxes on
 > different platforms and have never encountered a problem with this.
 >
  > > one way, and manually another way, it's harder to be SURE that
  > > they are the same.
 >
 > I see what you mean and theoretically you're right. Still, I've not had
 > problems with it.
 >
  > > So, why don't people use apachectl in their system startup scripts?
 >
 > There are differences in start/stop scripts and wrapper scripts, where
 > the latter usually has more options. The start/stop scripts are usually
 > run by /etc/init.d/rc (or something like that), which is controlled by
 > init, whereas a wrapper script is more a "user" (instead of "daemon") thing.
 >
 > For Apache the difference might be very little, but there are a few
 > start/stop scripts which have to run when /usr (and thereby /usr/bin and
 > /usr/sbin) are not yet mounted (or already u(n)mounted in case of going
 > down).
 >
 > You might want to symlink the start/stop script to apachectl as Davide
 > pointed out (not that he really suggested it), but that may raise other
 > problems and I would recommend against it.
 >
 >
I've learned a bit more about it, and at least on Redhat systems,
the /etc/init.d/* scripts have a specific set of exit statuses that
they are supposed to return, and apachectl does not return the correct
ones, so doing a symlink to apachectl won't work just right (although it
will be very close; maybe close enough for most people). So a wrapper
is called for.

And that's what I'm planning to do. That way, whatever options I need
to define for Apache (-DSSL, etc) can be put in apachectl, and the init
script doesn't have to be kept in sync.

Thanks to those who responded. The Net comes through again!
--
Bob Langford, Silicon Masters Consulting, Inc.
langford.RemoveThis@silicon-masters.com <a style='text-decoration: underline;' href="http://www.silicon-masters.com/" target="_blank">http://www.silicon-masters.com/</a>
phone: 804-674-1253 fax: 804-745-7803<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: need opinions about startup script 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Web Server With DSL? Opinions Please. - Looking for suggestions on running my own web server on my DSL connection. The traffic expected is fairly low, maybe anywhere from a couple hundred to 1500 hits a day max and I won't be serving files other than image files, nothing over 1MB probably, no....

Service Startup - I have Apache 1.3.28 setup as a service on Windows XP pro. It is setup to start automatically, but doesn't. I have to open the services window to start it. Anybody know how to fix this? Thanks

Service Startup - I'm running Windows XP pro, and when I restart it Apache 1.3.28 does not start automatically. It is in the services and setup to start automatically but I have to open up the services window and start it each time. Anybody know how to fix this? Thanks

jakarta-tomcat 5.0.19 startup.sh - I just installed jakarta-tomcat-5.0.19 on solaris 10 and it is working just fine. I have a wokring mod_jk so all the requests are parsed to port 80. The problem is that tomcat without any clue just shutsdown. This morning I came in the office and tomca...

Apache startup error - This happened when I tried to make a minor change to the http.conf - change the IP address in NameVirtualHost and VirtualHost definitions.I cannot start apache and the only thing I am getting is: ssl_error_log: [error] Server should be SSL-aware but has...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]