Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1:   #!/bin/sh   # - # $Id: start,v 1.77 1999/09/10 19:58:05 mast Exp $ + # $Id: start,v 1.78 1999/09/10 22:08:15 mast Exp $    - pre="`echo \" $$ \" | sed -e 's/\(.........\)\(.*\)/\1/g'` : " + pre="`echo \" $$ \" | sed -e 's/\(.........\)\(.*\)/\1/g'` :"      cd `dirname $0`      # Can be set with '--config-dir=DIR'   DIR=../configurations/   LOGDIR=../logs/   FILES="default"   program=base_server/roxenloader.pike   extra_args=""   
Roxen.git/server/start:56:    fi    DEFINES="`echo $DEFINES | sed -e 's/-DENABLE_THREADS//'`"    fi    fi   fi      gdb=no      remove_old_dot_o_files () {    echo "$pre Removing old .o files ($1)" +  > "$roxendir/.remove_dumped_mark"    find . -name '*.o' | xargs rm -f   }         ## Parse all arguments.   ## GNU-style, long options only, except for -D, simply passed on.   parse_args() {    while [ ! c"$1" = "c" ] ; do    case $1 in    -D*)
Roxen.git/server/start:406:    if [ "x$DIR" != "x../configurations/" ] ; then    args="$DEFINES $program --config-dir=$DIR $pass"    else    args="$DEFINES $program $pass"    fi    if [ x$cd_to != x ] ; then    cd $cd_to    fi    if [ "x$gdb" = "xno" ]; then    if [ $verbose -gt 0 ]; then -  echo "$pre Executing $pike $args $@"|sed -e "s!`pwd`!.!g" +  echo "$pre" "Executing $pike $args $@"|sed -e "s!`pwd`!.!g"    else :; fi    $pike $args $@    else -  echo $pre Executing gdb $pike $args $@ +  echo "$pre" Executing gdb $pike $args $@    echo >.gdbinit handle SIGPIPE nostop noprint pass    echo >>.gdbinit handle SIGUSR1 nostop noprint pass    echo >>.gdbinit handle SIGUSR2 nostop noprint pass    echo >>.gdbinit run $args $@    gdb $pike    rm .gdbinit    fi   }      #
Roxen.git/server/start:445:   PIKEVERSION=`$pike --version 2>&1`      if [ "`cat .old_roxen_defines 2>/dev/null`" != "$PIKEVERSION $DEFINES" ] ; then    remove_old_dot_o_files "DEFINES changed"   fi      echo "$PIKEVERSION $DEFINES" > .old_roxen_defines      if [ -z "$once" ] ; then    if [ $verbose -gt 0 ]; then -  echo $pre Starting the Roxen Challenger World Wide Web server. +  echo "$pre" Starting the Roxen Challenger World Wide Web server.    else :; fi    ./mkdir -p $LOGDIR/debug/       if [ $verbose -gt 0 ]; then    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    else :; fi       # Try to get rid of some fd's.    # Some /bin/sh's have problems detaching otherwise.       exec >/dev/null    exec 2>/dev/null    exec </dev/null       (while : ; do -  echo $pre "Server restart at `date`" -  echo $pre "Debug log in $LOGDIR/debug/$FILES.1" +  echo "$pre" "Server restart at `date`" +  echo "$pre" "Debug log in $LOGDIR/debug/$FILES.1"    rotate $LOGDIR/debug/$FILES       start_roxen $extra_args 2>>$LOGDIR/debug/$FILES.1 1>&2       exitcode="$?"       if [ "$exitcode" -eq "0" ] ; then    # Clean shutdown. -  echo $pre "Roxen shutdown." +  echo "$pre" "Roxen shutdown."    exit 0    fi    if [ "$exitcode" -lt "0" ] ; then    # Signal death. -  echo $pre "Roxen died of signal $exitcode. Restarting..." +  echo "$pre" "Roxen died of signal $exitcode. Restarting..."    else -  echo $pre Roxen down. Restarting. +  echo "$pre" Roxen down. Restarting.    fi    done) < /dev/null > $LOGDIR/debug/start_$FILES.output 2>&1 &   else    if [ $verbose -gt 0 ]; then    echo "$pre Start at `date`"    else :; fi    start_roxen $extra_args   fi -  +