Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1:   #!/bin/sh   # - # $Id: start,v 1.199 2002/10/01 23:18:16 nilsson Exp $ + # $Id: start,v 1.200 2002/10/22 00:06:44 nilsson 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() {
Roxen.git/server/start:291:    ;;    -D*|-M*|-I*|-P*)    # Argument passed along to Pike.    DEFINES="$DEFINES $1"    ;;    '--version')    if [ "x$passhelp" = "x1" ] ; then    pass="$pass --version"    else    if [ -f server_core/roxen.pike ]; then -  echo "Internet Server `roxen_version`" +  echo "ChiliMoon `roxen_version`"    exit 0    else    echo 'server_core/roxen.pike not found!'    exit 1    fi    fi    ;;    --self-test-dir=*)    SELF_TEST_DIR=`echo $1 | sed -e's/--self-test-dir=//'`    ;;
Roxen.git/server/start:320:    ;;    '--self-test-verbose')    pass="$pass --tests-verbose=1"    setup_for_tests    ;;    '--help'|'-?')    if [ "x$passhelp" = "x1" ] ; then    pass="$pass --help"    else    sed -e "s/\\.B/`tput 'bold' 2>/dev/null`/g" -e "s/B\\./`tput 'sgr0' 2>/dev/null`/g" << EOF - .BThis command will start the Internet ServerB.. + .BThis command will start ChiliMoonB..      The environment variable .BROXEN_ARGSB. can be used to specify   the default arguments.       .BArguments:B.       .B--versionB.: Output version information.       .B--help -?B.: This information.   
Roxen.git/server/start:530:   fi      if [ ! "X$pass" = "X" ] ; then set -- $pass ;fi         ####### END ARGUMENT PARSING         ####### BEGIN PIKE OPTIONS    - # Internet Server will create files as the initial user, - # which it expects to be able to read as the run-time user. + # ChiliMoon will create files as the initial user, which it expects to + # be able to read as the run-time user.   umask 022      if [ "x$PIKE_NO_DEFAULT_PATHS" = "x" ]; then    # Pike default Master-program    if [ "x$PIKE_MASTER" = "x" ]; then    if [ -f lib/master.pike ]; then    DEFINES="$DEFINES \"-m$roxendir/lib/master.pike\""    elif [ -f lib/pike/master.pike ]; then    DEFINES="$DEFINES \"-m$roxendir/lib/pike/master.pike\""    fi
Roxen.git/server/start:616:      cleanup_pid_file() {    [ -z "$pidfile" ] || rm $pidfile   }      signal_exit() {    dp "Start script terminating."    trap "" 2 15    if [ "x$ROXEN_PID" != "x" ]; then    kill $ROXEN_PID 2>/dev/null && wait $ROXEN_PID 2>/dev/null -  dp "Internet Server shutdown." +  dp "ChiliMoon shutdown."    fi    if [ "x$keep_mysql" = "x" ] ; then    if [ -f $DIR/_mysql/mysql_pid ] ; then    dp "Shutting down mysql."    kill `cat $DIR/_mysql/mysql_pid` 2>/dev/null    sleep 2    if [ -f $DIR/_mysql/mysql_pid ] ; then    kill -9 `cat $DIR/_mysql/mysql_pid` 2>/dev/null    fi    rm -f $DIR/_mysql/mysql_pid 2>/dev/null
Roxen.git/server/start:670:    if [ $verbose -gt 0 ]; then    if [ $verbose -gt 1 -o -z "$once" ] ; then    dp "Executing $pike $args"|sed -e "s!`pwd`!.!g"    else    dp "Using the '$pike' pike binary"|sed -e "s!`pwd`!.!g"    fi    fi       if [ "x$once" = "x" ]; then    eval "fork_roxen \"$pike\" $args 2>>\"${DEBUGLOG}.1\" 1>&2" -  dp "Internet Server server pid $ROXEN_PID." +  dp "ChiliMoon server pid $ROXEN_PID."    wait $ROXEN_PID 2>/dev/null 1>&2    exitcode="$?"    ROXEN_PID=""    else    if [ "x$do_pipe" = "x" ] ; then    if [ "x$once" = "x1" ]; then    eval "fork_roxen \"$pike\" $args 2>&1"    wait $ROXEN_PID 2>/dev/null 1>&2    exitcode="$?"    ROXEN_PID=""
Roxen.git/server/start:774:      if [ "$program" = "server_core/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      if [ -z "$once" ] ; then    if [ $verbose -gt 0 ]; then -  dp "Starting the Internet Server." +  dp "Starting the ChiliMoon."    else :; fi    if [ "x$DEBUGLOG" = "x" ] ; then    DEBUGDIR="$LOGDIR/debug"    DEBUGLOG="$DEBUGDIR/$FILES"    else    DEBUGDIR="`dirname "$DEBUGLOG"`"    fi    # This duplicate of the logdir creation code is needed, check the    # redirect below    if [ ! -d "$DEBUGDIR" ] ; then
Roxen.git/server/start:821:    fi    fi       dp "Server start at `date`"    dp "Debug log in ${DEBUGLOG}.1"    rotate "$DEBUGLOG"    start_roxen       if [ "$exitcode" -eq "0" ] ; then    # Clean shutdown. -  dp "Internet Server shutdown." +  dp "ChiliMoon shutdown."    signal_exit    # Note reached, but...    exit 0    fi    if [ "$exitcode" -lt "0" ] ; then    # Signal death. -  dp "Internet Server died of signal $exitcode." +  dp "ChiliMoon died of signal $exitcode."    else    case "$exitcode" in    100) -  dp "Changing Internet Server version. Restarting." +  dp "Changing ChiliMoon version. Restarting."    # We need to clean up the pid file, since we're mentioned in it...    cleanup_pid_file    cd .. && exec ./start "$@"    dp 'Failed to spawn start script. -- Permission problem?'    exit 1    ;;    *) -  dp "Internet Server down with code $exitcode." +  dp "ChiliMoon down with code $exitcode."    ;;    esac    fi    if [ -f "$LOCALDIR/restart_rc" ]; then    dp "Running $LOCALDIR/restart_rc..."    if /bin/sh "$LOCALDIR/restart_rc"; then :; else    dp "$LOCALDIR/restart_rc failed with code $?."    fi    fi    dp "Restarting..."