[system] / trunk / webwork-modperl / bin / wwapachectl.dist Repository:
ViewVC logotype

View of /trunk/webwork-modperl/bin/wwapachectl.dist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1703 - (download) (annotate)
Mon Jan 5 01:02:41 2004 UTC (9 years, 4 months ago) by sh002i
File size: 1769 byte(s)
removed lingering references to "webwork-modperl", since we're calling
this product "webwork2" now. soon we should change the name of the CVS
module to "webwork2" as well.

    1 #!/bin/sh
    2 ################################################################################
    3 # WeBWorK Online Homework Delivery System
    4 # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
    5 # $CVSHeader: webwork-modperl/bin/wwapachectl.dist,v 1.6 2003/12/09 01:12:28 sh002i Exp $
    6 #
    7 # This program is free software; you can redistribute it and/or modify it under
    8 # the terms of either: (a) the GNU General Public License as published by the
    9 # Free Software Foundation; either version 2, or (at your option) any later
   10 # version, or (b) the "Artistic License" which comes with this package.
   11 #
   12 # This program is distributed in the hope that it will be useful, but WITHOUT
   13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
   14 # FOR A PARTICULAR PURPOSE.  See either the GNU General Public License or the
   15 # Artistic License for more details.
   16 ################################################################################
   17 
   18 # Set the following values to correspond to your local configuration
   19 HTTPD=/usr/local/sbin/httpd
   20 WEBWORKROOT=/home/yourname/webwork2
   21 
   22 CONFIG=$WEBWORKROOT/conf/httpd-wwmp.conf
   23 PID=$WEBWORKROOT/logs/httpd.pid
   24 
   25 usage() {
   26   echo "$0 { start | stop | restart | graceful | configtest }"
   27 }
   28 
   29 checkpid() {
   30   if [ ! -e $PID ]; then
   31     echo "$PID: not found. (Perhaps the server is not running?)"
   32     exit
   33   fi
   34 }
   35 
   36 checknopid() {
   37   if [ -e $PID ]; then
   38     echo "$PID: exists. (Perhaps the server is already running?)"
   39     exit
   40   fi
   41 }
   42 
   43 case $1 in
   44   start)
   45     checknopid
   46     "${HTTPD}" -f "${CONFIG}"
   47     ;;
   48   stop)
   49     checkpid
   50     kill -TERM `cat "${PID}"`
   51     ;;
   52   restart)
   53     checkpid
   54     kill -HUP `cat "${PID}"`
   55     ;;
   56   graceful)
   57     checkpid
   58     kill -USR1 `cat "${PID}"`
   59     ;;
   60   configtest)
   61     "${HTTPD}" -t -f "${CONFIG}"
   62     ;;
   63   *)
   64     usage
   65     ;;
   66 esac

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9