Stephen Reppucci wrote:
> 
> Hi Darren,
> 
> See my suggested refinement below (I don't like to leave the server
> down any longer than needed...8^):
> 
> On Tue, 9 Apr 2002, darren chamberlain wrote:
> 
> > For exactly this reason, I always modify apachectl so that the restart
> > option looks like:
> >
> >     restart)
> >         timeout=${2:-5}
> >         count=0
> >         $0 stop
> >         while [ $count -lt $timeout ]; do
> 
>           while [ -f $PIDFILE -a $count -lt $timeout ]; do
> 
> >             echo -n ". "
> >             sleep 1
> >             count=`expr $count + 1`
> >         done
> >         echo ""
> >         $0 start
> >         ;;
> >
> > This will sleep for $2 (or 5 seconds) between stopping and starting.
> > The sleep ensures that the start doesn't get called too quickly.
> 
On Debian, if you use the /etc/init.d/apache[-perl] script for
restarting, it uses the start-stop-daemon program to do essentially the
same thing.  (Another reason I like Debian :-).


Reply via email to