Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1:   #!/bin/sh   # - # $Id: start,v 1.143 2001/01/01 08:30:34 nilsson Exp $ + # $Id: start,v 1.144 2001/01/03 05:58:45 per Exp $      ### If --silent-start is given as the first argument,   ### nothing will be printed to stdout by the script.      if [ "x$1" = "x--silent-start" ] ; then    SILENT_START="y"    shift   fi      check_owner() { -  uid=`$pike -e 'write("%d",getuid())'` +     gargs=''    -  if [ x"$uid" = x0 ] ; then +  if [ -w / ] ; then    # Shall we change uid/gid?    num=`grep --help 2>&1|grep gnu|wc -l`    num=`echo $num`    if [ x"$num" = x1 ] ; then    gargs='-a'    fi    ugid=`grep $gargs "='User'>" $DIR/Global_Variables 2>/dev/null\    | sed -e 's/.*<str>//' -e 's,</str>.*,,'`    if [ ! x$ugid = x ] ; then    dp "Doing uid change to $ugid"
Roxen.git/server/start:406:      # The work has already been done above, but the debug printout is better   # to have _after_ parse_args (consider --help and --version)      if [ ! "X$ROXEN_ARGS" = "X" ]; then    if [ $verbose -gt 0 ]; then    dp "Used $ROXEN_ARGS from ROXEN_ARGS."    else :; fi   fi    -  - #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 - # dp "Solaris 2.5 or later was detected. Threads enabled by default." - # fi - # fi - #fi -  -  +    if [ ! "X$pass" = "X" ] ; then set -- $pass ;fi         ####### END ARGUMENT PARSING         ####### BEGIN PIKE OPTIONS      # Roxen WebServer will create files as the initial user,   # which it expects to be able to read as the run-time user.
Roxen.git/server/start:447:    # This is useful when using several different Pikes.    # Specify include and module paths with    # PIKE_INCLUDE_PATH and PIKE_MODULE_PATH    # they are handled automatically by the master,    # so no need to do it here.    DEFINES="$DEFINES -m$PIKE_MASTER"    fi   fi      # Extra module-path - if [ -d etc/modules ]; then + #if [ -d etc/modules ]; then    DEFINES="$DEFINES -M$roxendir/etc/modules" - fi + #fi      # Extra include-path - if [ -d etc/include ]; then + #if [ -d etc/include ]; then    DEFINES="$DEFINES -I$roxendir/etc/include" - fi + #fi      if [ -d $LOCALDIR/include ]; then    DEFINES="$DEFINES -I$LOCALDIR/include"   fi      # Extra include-path (2) - if [ -d base_server ]; then + #if [ -d base_server ]; then    DEFINES="$DEFINES -I$roxendir/base_server" - fi + #fi      if [ -d $LOCALDIR/base_server ]; then    DEFINES="$DEFINES -I$LOCALDIR/base_server -P$LOCALDIR/base_server"   fi      # Extra program-path   DEFINES="$DEFINES -P`pwd`"      # Support for adding local pike-modules   if [ -d $LOCALDIR/etc/. ]; then
Roxen.git/server/start:492:    fi       # Extra program-path    DEFINES="$DEFINES -P$LOCALDIR/etc"   fi      # Extra kludge for HPUX   # HPUX doesn't like group 60001(nobody)   if uname | grep 'HP-UX' >/dev/null 2>&1; then    if [ $verbose -gt 0 ]; then -  dp "WARNING: Applying kludge for HPUX. (see base_server/privs.pike)" +  dp "WARNING: Applying kludge for HPUX. (see base_server/roxen.pike)"    else :; fi    DEFINES="$DEFINES -DHPUX_KLUDGE"   fi         case "x$debug" in    "x")    DEBUG="-DMODULE_DEBUG "    ARGS="$ARGS -w"    ;;
Roxen.git/server/start:521:      DEFINES="$DEBUG $DEFINES"      ####### END PIKE OPTIONS         #   # 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 - } -  +    signal_exit() {    dp "Start script terminated."    if [ "x$ROXEN_PID" != "x" ]; then    kill $ROXEN_PID 2>/dev/null    while kill -0 $ROXEN_PID 2>/dev/null; do    sleep 1    done    fi    dp "Roxen WebServer shutdown."    exit 0
Roxen.git/server/start:602:    rm .gdbinit    fi   }         #   # Now do the stuff   #   PIKEVERSION="`$pike --version 2>&1|head -1`"   LS="`ls -lL $pike 2>/dev/null`" - LS="$LS `ls -lL etc/modules/ etc/modules/*/. 2>/dev/null`" - LS="$LS `ls -lL base_server 2>/dev/null`" + LS="$LS `find -ls etc/modules 2>/dev/null`" + LS="$LS `find -ls base_server 2>/dev/null`"      VERSION_DATA="$PIKEVERSION $DEFINES $LS"      if [ "$program" = "base_server/roxenloader.pike" ] ; then    if [ "`cat $old_roxen_defines 2>/dev/null`" != "$VERSION_DATA" ] ; then    remove_old_dot_o_files "defines or pike version changed"    fi    echo "$VERSION_DATA" > $old_roxen_defines   fi