[lug] Apache start on boot

Scott A. Herod herod at interact-tv.com
Tue Aug 7 13:45:57 MDT 2001


Note, that if you add:

# chkconfig: 2345 08 92
# description: My start and stop script.

(Yes it needs to be commented.)

to the start of your script in init.d, you can use chkconfig to
automatically
set the Start and Kill symlinks for you.  See the chkconfig man page and
some of the existing init.d scripts.

Scott

dan radom wrote:
> 
> here's the script i use to start apache...
> 
> <snip>
> #!/bin/sh
> # dan at radom.org | modified 01.03.2001
> case "$1" in
>   start)
>  echo -n "starting httpd..."
>  /usr/local/apache/bin/apachectl start
> ;;
> 
>   stop)
>  echo -n "stopping httpd..."
>  /usr/local/apache/bin/apachectl stop
> ;;
> 
>   restart)
>  echo -n "stopping httpd..."
>         /usr/local/apache/bin/apachectl restart
> ;;
> 
>   fullstatus)
>  /usr/local/apache/bin/apachectl fullstatus
> ;;
> 
>   status)
>  /usr/local/apache/bin/apachectl status
> ;;
> 
>   graceful)
>  /usr/local/apache/bin/apachectl graceful
> ;;
> 
>   configtest)
>  /usr/local/apache/bin/apachectl configtest
> ;;
> 
>   help)
>  /usr/local/apache/bin/apachectl help
> ;;
> 
>   *)
>  echo "*** Usage: httpd {start|stop|restart|fullstatus|status|graceful|configtest|help}"
>  exit 1
> esac
> </snip>
> 
> the script is in init.d and symlinked to my runlevel...rc3.d
> 
> hope this helps,
> 
> dan
> 
> * Chad Wasinger (cswasinger at qwest.net) wrote:
> > Man this RH sure is different than Solaris. Ok no matter where I put this I
> > can't get Apache httpd to start on boot.
> > I put an S99 script in /etc/rc2.d and /etc/rc3.d and still no go, what is
> > the trick?
> >
> > Thanks to everyone for the help so far!
> >
> > Chad



More information about the LUG mailing list