infoCopter.com
retoh's Online Repository for myself and other Web Geeks

home | newsletter | site map

Free Stuff

: links

: Neue Surf Tips

: know-how

: Zitate

: Spam Strike

: HTML Checker!

: Link Checker

: Cartoons



About IC

: friends

: lust und frust

: guestbook

: what's new

Apache Autostart
See also
p-friendly
Home :: Know-how :: Apache Autostart


RedHat/chkconfig-compliant start script:

#!/bin/sh
#
# httpd      This shell script takes care of starting and stopping
#            httpd.
#
# chkconfig: 2345 65 35
# description: httpd provides support for updating dynamic DNS services.

PATH=/usr/sbin:/root/bin:${PATH}
export PATH

HTTPD='/usr/local/apache2/bin/httpd'

case "$1" in
  start)
        echo -n "Starting httpd: "
        $HTTPD -k $1
        echo
        ;;
  stop)
        echo -n "Shutting down httpd: "
        $HTTPD -k $1
        echo
        ;;
  restart)
        echo -n "Restarting httpd: "
        $HTTPD -k $1
        echo
        ;;
  *)
        echo "Usage: httpd {start|stop|restart|status}"
        exit 1
esac

exit 0

Save this file as "apache"

cp apache /etc/rc.d/init.d/

Add to chkconfig:

/sbin/chkconfig --add apache
Know-How home | Must Read | What's new? | iC Site Map
link search
©1998-2004 infoCopter