Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1:   #!/bin/sh   # - # $Id: start,v 1.93 2000/02/14 23:49:30 nilsson Exp $ + # $Id: start,v 1.94 2000/02/16 09:52:15 per Exp $      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
Roxen.git/server/start:26:   # Set up environment   if test -f etc/environment; then    . etc/environment   fi      # Make sure $CLASSPATH contains the servlet stuff   CLASSPATH=java/classes/roxen_module.jar:java/classes/roxen_servlet.jar:java/classes/servlet.jar:java/classes${CLASSPATH:+:}$CLASSPATH   export CLASSPATH       - pike=pike + pike=`type pike|head -1|sed -e's,.*is ,,'`   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      ####### BEGIN ARGUMENT PARSING         DEFINES="$DEFINES -DKEEP_ALIVE"      # Enable threads (if available) on Solaris.   # Most other OS's have thread bugs that cause them or Roxen to crash.   if uname | grep 'SunOS' >/dev/null 2>&1; then    if uname -r | grep '5\.[5-9]' >/dev/null 2>&1; then    if [ $verbose -gt 0 ] ; then    echo "$pre Solaris 2.5 or later detected. Enabling threads (if available)."    fi    DEFINES="$DEFINES -DENABLE_THREADS -DTHREADS" -  if $pike --version 2>&1|head -1|grep 0.5 ; then -  if [ $verbose -gt 0 ] ; then -  echo "$pre Pike 0.5 detected. Exiting." -  exit 1 +     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)"    find $pcdir -name '*.o' | xargs rm -f   }         ## Parse all arguments.
Roxen.git/server/start:457:    if [ "x$DIR" != "x../configurations/" ] ; then    args="$DEFINES $ARGS $program --config-dir=$DIR $pass"    else    args="$DEFINES $ARGS $program $pass"    fi    if [ x$cd_to != x ] ; then    cd $cd_to    fi    if [ "x$gdb" = "xno" ]; then    if [ $verbose -gt 0 ]; then +  if [ $verbose -gt 1 ] ; then    echo "$pre" "Executing $pike $args $@"|sed -e "s!`pwd`!.!g" -  else :; fi +  else +  echo "$pre" "Using '$pike'"|sed -e "s!`pwd`!.!g" +  fi +  fi    args="-DSERIOUS $args"    $pike $args $@    else    echo "$pre" Executing gdb $pike $args $@    args="-DSERIOUS $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
Roxen.git/server/start:509:    # Try to get rid of some fd's.    # Some /bin/sh's have problems detaching otherwise.       exec >/dev/null    exec </dev/null       if ((while : ; do    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."    exit 0    fi    if [ "$exitcode" -lt "0" ] ; then
Roxen.git/server/start:532:    else    echo "$pre" Roxen down. Restarting.    fi    done) & ) </dev/null >$LOGDIR/debug/start_$FILES.output 2>&1; then    :;    else    echo 'Failed to spawn subshell. -- Permission problem?' 1>&2    exit 1    fi   else -  if [ $verbose -gt 0 ]; then -  echo "$pre Start at `date`" -  else :; fi +     start_roxen $extra_args 2>&1   fi