Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:15:       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 +  if [ ! "x$ugid" = x ] ; then    dp "Doing uid change to $ugid"    oifs="$IFS";IFS=':';set $ugid;IFS="$oifs"    if [ ! "x$2" = x ]; then    ok=`ls -lgd . 2>/dev/null | grep "$2" |wc -l`    ok=`echo $ok`    if [ "x$ok" = x1 ] ; then    dp "The server directory is already readable by group $2"    else    ok=`ls -ngd . 2>/dev/null | grep "$2" |wc -l`    ok=`echo $ok`
Roxen.git/server/start:130:      # Locate Pike binary.   find_pike      # Source environment   setup_environment      ####### BEGIN ARGUMENT PARSING       - DEFINES="$DEFINES -DRAM_CACHE -DNEW_RAM_CACHE -DHTTP_COMPRESSION" + DEFINES="$DEFINES -DRAM_CACHE -DHTTP_COMPRESSION"    -  - # Thread enabling. - # FIXME: Ought to use case...esac. -  - # 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 -  vers="`uname -r|sed -e 's/5.\([0-9]*\)/\1/p' -ed`" -  if [ "$vers" -ge "5" ]; then - # if [ $verbose -gt 0 ] ; then - # dp "Solaris 2.5 or later detected. Using threads by default." - # fi -  DEFINES="$DEFINES -DENABLE_THREADS" -  fi - fi - # Darwin uses threads. - if uname | grep 'Darwin' >/dev/null 2>&1; then -  DEFINES="$DEFINES -DENABLE_THREADS" - fi - # Also enabled on Linux. - if uname | grep 'Linux' >/dev/null 2>&1; then -  DEFINES="$DEFINES -DENABLE_THREADS" - fi -  +    gdb=no   valgrind=   truss=    -  + daemonize=yes +    remove_dumped_passed=no -  +    remove_old_dot_o_files () {    dp "Removing old precompiled files ($1)"    # This really cannot be done from here anymore -- pass on an option    # to roxenloader instead.       # Make sure that the argument isn't duplicated for every restart...    if [ "x$remove_dumped_passed" = "xyes" ]; then :; else    pass="$pass --remove-dumped"    remove_dumped_passed=yes    fi
Roxen.git/server/start:301:    '--without-ram-cache-stat'|'--disable-ram-cache-stat')    DEFINES="`-DRAM_CACHE_ASUME_STATIC_CONTENT`"    ;;    '--dump-debug'|'--with-dump-debug'|'--enable-dump-debug')    DEFINES="-DDUMP_DEBUG $DEFINES"    ;;    '--threads'|'--with-threads'|'--enable-threads')    DEFINES="-DENABLE_THREADS $DEFINES"    ;;    '--no-threads'|'--without-threads'|'--disable-threads') -  DEFINES="`echo $DEFINES | sed -e 's/-DENABLE_THREADS//g'`" +  echo "Thread support not optional -- ignoring $1" >&2    ;;    '--with-profile'|'--profile')    DEFINES="-DPROFILE $DEFINES"    ;;    '--with-file-profile'|'--file-profile')    DEFINES="-DPROFILE -DFILE_PROFILE $DEFINES"    ;; -  +  '--without-daemon'|'--without-deamonize') +  daemonize=no +  ;;    '--generations='*)    GENERATIONS=`echo $1 | sed -e 's/--generations=//'`    if test "$GENERATIONS" -gt 1; then :; else    echo "Invalid number of log generations: $GENERATIONS" >&2    echo "Using default: 5" >&2    GENERATIONS=5    fi    ;;    '--generations')    GENERATIONS="$2"
Roxen.git/server/start:477:    Defaults to .B../logs/debug/B.configdirname.B.1B..       .B--pid-file=FILEB.: Store the Roxen and start script pids in this    file. Defaults to .B../configurations/_roxen_pidB..       .B--silent-startB.: Inhibits output to stdout. If used,    this argument must be the first one.       .B--strip-backslashB.: Replace all \\ characters in URIs with /    +  .B--without-daemonB.: Do not detach from the started server. +  This is typically used with launchd. +     .B--without-ram-cacheB.: Do not use a protocol level RAM cache to speed    things up. Saves RAM at the cost of speed.       .B--without-ram-cache-statB.: Disable the stat that is usually done    for files in the protocol cache to ensure that    they are not changed before they are sent.    Improves performance at the cost of constant    aggravation if the site is edited. Useful for    truly static sites.   
Roxen.git/server/start:1320:    fi    fi    dp "Restarting..."    done    ) &    # Minor race here wrt pid file contents.    start_pid=$!    trap "" 0    dp "Forked start script, pid $start_pid." 2>&3    dp "Start script pid $start_pid." +  +  if test "x$daemonize" = "xyes"; then :; else +  trap "stop_roxen $start_pid TERM start \"$canonicalconf\" \"start script\"" 2 15 +  wait; +  signal_exit +  fi    ) 3>&2 </dev/null >"$DEBUGDIR/start_$FILES.output" 2>&1; then    trap "" 0    :    else    dp 'Failed to spawn subshell. -- Permission problem?'    cleanup_start_pid_file    exit 1    fi       # Try to get rid of some fd's.