Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1:   #!/bin/sh   # - # $Id: start,v 1.56 1998/11/22 21:15:10 grubba Exp $ + # $Id: start,v 1.57 1998/11/28 13:40:57 per Exp $      cd `dirname $0` -  + roxendir="$PWD" +    VERSION=202; BETA=.b;      # Can be set with '--config-dir=DIR'   DIR=../configurations/   LOGDIR=../logs/   FILES="default"   program=base_server/roxenloader.pike   extra_args=""      roxendir=`pwd`
Roxen.git/server/start:68:    DEFINES="$DEFINES -Ibase_server"   fi      # Extra program-path   DEFINES="$DEFINES -P`pwd`"      # Support for adding local pike-modules   if [ -d ../local/etc/. ]; then    # Extra module-path    if [ -d ../local/etc/modules/. ]; then -  DEFINES="$DEFINES -M../local/etc/modules" +  DEFINES="$DEFINES -M$roxendir/../local/etc/modules"    fi       # Extra include-path    if [ -d ../local/etc/include ]; then -  DEFINES="$DEFINES -I../local/etc/include" +  DEFINES="$DEFINES -I$roxendir/../local/etc/include"    fi       # Extra program-path -  DEFINES="$DEFINES -P../local/etc" +  DEFINES="$DEFINES -P$roxendir/../local/etc"   fi      # Extra kludge for HPUX   # HPUX doesn't like group 60001(nobody)   if uname | grep 'HP-UX' >/dev/null 2>&1; then    echo 'WARNING: Applying kludge for HPUX. (see base_server/privs.pike)'    DEFINES="$DEFINES -DHPUX_KLUDGE"   fi      pike=pike - if [ -x bin/pike ] ; then pike=bin/pike; fi - if [ -x bin/roxen ] ; then pike=bin/roxen; fi + if [ -x bin/pike ] ; then pike=$roxendir/bin/pike; fi + if [ -x bin/roxen ] ; then pike=$roxendir/bin/roxen; fi   if [ "x$PIKE" = "x" ]; then :; else    if [ -x "$PIKE" ]; then pike="$PIKE"; fi   fi      gdb=no      ####### END PREAMBLE      ## Parse all arguments.   ## GNU-style, long options only, except for -D, simply passed on.
Roxen.git/server/start:158:   # some "creative" spellings... :-)    '--onve'|'--onec'|'--onev')    once=1    ;;    '--gdb')    gdb=gdb    once=1    ;;    '--program')    program="$2" +  once=1    shift    ;;    '--cd')    cd_to="$2" -  +  once=1    shift    ;;    '--version')    echo Roxen Challenger 1.`expr $VERSION / 100`$BETA`expr $VERSION % 100`    exit 0    ;;    '--help'|'-?')    sed -e "s/\\.B/`tput 'bold' 2>/dev/null`/g" -e "s/B\\./`tput 'rmso' 2>/dev/null`/g" << EOF   .BThis command will start the Roxen serverB..   
Roxen.git/server/start:286:   parse_args $@      if [ ! "X$ROXEN_ARGS" = "X" ]; then    echo $$: Using $ROXEN_ARGS from ROXEN_ARGS.    parse_args $ROXEN_ARGS   fi      if [ ! "X$pass" = "X" ] ; then set -- $pass ;fi       - echo $$: Starting the Roxen Challenger World Wide Web server. +     - ./mkdir -p $LOGDIR/debug/ -  - if [ -z "$debug" ] ; then -  DEBUG="-DMODULE_DEBUG"; - else -  DEBUG="-DDEBUG -DMODULE_DEBUG" - fi -  - if [ "x$debug" = "x-1" ] ; then -  DEBUG=""; - else :; fi -  +    #   # Some useful functions   #      rotate () {    b=5;    for a in 4 3 2 1 ; do mv -f $1.$a $1.$b 2> /dev/null; b=$a; done   }      start_roxen() {
Roxen.git/server/start:338:    gdb $pike    rm .gdbinit    fi   }      #   # Now do the stuff   #      if [ -z "$once" ] ; then + echo $$: Starting the Roxen Challenger World Wide Web server. + ./mkdir -p $LOGDIR/debug/ +  + if [ -z "$debug" ] ; then +  DEBUG="-DMODULE_DEBUG"; + else +  DEBUG="-DDEBUG -DMODULE_DEBUG" + fi +  + if [ "x$debug" = "x-1" ] ; then +  DEBUG=""; + else :; fi +     cat << oo   Using configuration from $DIR, storing the debug log in $LOGDIR/debug/$FILES.1   You can use the configuration interface in the server to get debug info.   oo       # Try to get rid of some fd's.    # Some /bin/sh's have problems detaching otherwise.       exec >/dev/null    exec 2>/dev/null
Roxen.git/server/start:372:    exit 0    fi    if [ "$exitcode" -lt "0" ] ; then    # Signal death.    echo $$: "Roxen died of signal $exitcode. Restarting..."    else    echo $$: Roxen down. Restarting.    fi    done) < /dev/null > $LOGDIR/debug/start_$FILES.output 2>&1 &   else -  echo $$: "Server restart at `date`" +  echo $$: "Start at `date`"    start_roxen $extra_args   fi