Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1:   #!/bin/sh   # - # $Id: start,v 1.134 2000/11/16 10:58:36 per Exp $ + # $Id: start,v 1.135 2000/11/20 07:48:27 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      pre="`echo \" \" | sed -e 's/\(.........\)\(.*\)/\1/g'` :"      dp() {    if [ "x$SILENT_START" = "xy" ]    then :; else    echo "$pre" "$@" 2>&1    fi   }    -  + unlimit_fds() { +  nfds=32 +  mnfds=32 +  while [ $nfds -lt "999999999" ] ; do +  nfds=`expr $nfds \* 2` +  if ulimit -n $nfds ; then +  mnfds="$nfds" +  fi +  done +  dp "Maximum number of open FDs: $mnfds" +  if [ "$mnfds" -lt 1024 ] ; then +  dp "Warning: This is dangerously low" +  fi + }    -  +    change_owner( ) {    uid="$1"; shift    gid="$1"; shift       for a in "$@" ; do    ok=`ls -lgd $a 2>/dev/null | grep $uid | grep $gid | wc -l`    ok=`echo $ok`    if [ x$ok = x1 ] ; then    dp "$a already has the correct ownership"    else
Roxen.git/server/start:627:    while kill -0 $ROXEN_PID 2>/dev/null; do    sleep 1    done    fi    dp "Roxen WebServer shutdown."    exit 0   }      start_roxen() {    check_owner +  unlimit_fds    if [ x$remove_dumped = x1 ] ; then    remove_old_dot_o_files "user request"    fi    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