httpd の変更点   

  • 追加された行はこの色です。
  • 削除された行はこの色です。
  • httpd へ行く。

#!/bin/bash
 #
 # httpd        Startup script for the Apache HTTP Server
 #
 # chkconfig: 345 85 15
 # description: Apache is a World Wide Web server.  It is used to serve \
 #              HTML files and CGI.
 # processname: httpd
 # config: /usr/local/apache2/conf/httpd.conf
 # pidfile: /var/run/httpd.pid 
 
 # Source function library.
 . /etc/rc.d/init.d/functions 
 
 # Path to the apachectl script, server binary, and short-form for messages.
 apachectl=/usr/local/apache2/bin/apachectl
 httpd=/usr/local/apache2/bin/httpd
 prog=httpd
 pidfile=${PIDFILE-/var/run/httpd.pid}
 lockfile=${LOCKFILE-/var/lock/subsys/httpd}
 RETVAL=0
 
 start() {
        echo -n $"Starting $prog: "
        /usr/local/apache2/bin/apachectl startssl
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch ${lockfile}
        return $RETVAL
 }
 stop() {
        echo -n $"Stopping $prog: "
        /usr/local/apache2/bin/apachectl stop
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
 }
 reload() {
        echo -n $"Reloading $prog: "
        killproc $httpd -HUP
        RETVAL=$?
        echo
 }
 
 # See how we were called.
 case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        status $httpd
        RETVAL=$?
        ;;
  restart)
        stop
        start
        ;;
  condrestart)
        if [ -f ${pidfile} ] ; then
                stop
                start
        fi
        ;;
  reload)
        reload
        ;;
  graceful|help|configtest|fullstatus)
        $apachectl $@
        RETVAL=$?
        ;;
  *)
        exit 1
 esac
 
 exit $RETVAL