All pastes #44849 Raw Edit

megaspaz - init.d

public shellscript v1 · immutable
#44849 ·published 2006-03-08 03:43 UTC
rendered paste body
#!/bin/sh## Startup script for the Apache Web Server## chkconfig: 345 97 15# description: Apache is a World Wide Web server.  It is used to serve \#   HTML files and CGI.# processname: httpd# Source function library.. /etc/rc.d/init.d/functionsAPACHEPROC="/usr/local/Apache2.2.X/bin/apachectl"start(){  echo -n "Starting httpd:"  $APACHEPROC start  if [ "$?" -ne 0 ]  then    echo "                                            [ FAIL ]"  else    echo "                                            [  OK  ]"  fi}stop(){  echo -n "Stopping httpd:"  $APACHEPROC stop  if [ "$?" -ne 0 ]  then    echo "                                            [ FAIL ]"  else    echo "                                            [  OK  ]"  fi }# See how we were called.case "$1" in  start)    start    ;;  stop)    stop    ;;  restart)    stop    start    ;;  *)  echo "Usage: (start|stop|restart)"  exit 1esac