Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1:   #!/bin/sh   # - # $Id: start,v 1.248 2012/09/27 10:04:49 grubba Exp $ + # $Id$      ### 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:184:   # Variable Default   # Value Description   # -----------------------------------------------------------------   # debug -1   # -1 No debug.   # 0 Module debug (Pike warnings + -DMODULE_DEBUG).   # 1 Full debug (Pike warnings + -DDEBUG -DMODULE_DEBUG).   # keep_mysql ""   # "" Shut down mysqld between restarts.   # 1 Do not touch mysqld on restart. + # 2 --mysql-only mode.   # once ""   # "" Loop the program until it exits with success (0).   # 1 Verbose --once mode.   # 2 Quiet --once mode.   # pass ""   # - Arguments to pass to the Pike program.   # passhelp ""   # "" Roxen is being started.   # 1 A custom program has been specified with --program.   # pidfile "$DIR/_roxen_pid"/""   # Defaults to "" if Roxen is not being started.   # "" Do not generate a pid file or associated lock files.   # other Create a pid file and associated lock files.   # program "base_server/roxen_loader.pike"   # - The Pike program to start. -  + # start 1 + # "" Do not attempt to start the server. + # 1 Attempt to start or restart the server. + # stop "" + # "" --stop or --restart not specified. + # 1 --stop or --restart specified.   # verbose 1   # 0 Quiet mode.   # 1 Default verbosity.   # 2 Verbose mode.   #    -  + stop_mysql() { +  # Kill roxen mysql if it's running... +  if [ -f "$DIR/_mysql/mysql_pid" ] ; then +  if kill -0 `cat "$DIR/_mysql/mysql_pid"` >/dev/null 2>&1; then +  dp "Stopping MySQL/MariaDB..." +  if kill `cat "$DIR/_mysql/mysql_pid"`; then +  dp "Ok." +  else +  dp "Failed to stop MySQL/MariaDB." +  fi +  else +  dp "MySQL/MariaDB does not appear to be running." +  fi +  fi + } +    setup_for_tests() {    # Kill roxen mysql if it's running...    if [ -f "$VARDIR/test_config/_mysql/mysql_pid" ] ; then    kill `cat "$VARDIR/test_config/_mysql/mysql_pid"`    fi    self_test=y    DEFINES="-DRUN_SELF_TEST -DSELF_TEST_DIR=\"$SELF_TEST_DIR\" $DEFINES"    rm -rf "$VARDIR/test_config"*    DIR="$VARDIR/test_config"    if [ -f "$SELF_TEST_DIR/scripts/setup.pike" ] ; then
Roxen.git/server/start:347:    ;;   # Misspelling --once might give undesirable results, so let's accept   # some "creative" spellings... :-)    '--onve'|'--onec'|'--onev'|'--ocne')    once=${once:-1}    debug=0    ;;    '--keep-mysql')    keep_mysql=1    ;; +  '--mysql-only') +  keep_mysql=2 +  once=1 +  pass="$pass --mysql-only" +  ;;    '--gdb')    gdb=gdb    once=2    debug=0    ;;    --valgrind|--valgrind=*)    valgrind="$1"    once=2    debug=0    ;;
Roxen.git/server/start:508:    This is very useful when debugging. Implies    --module-debug.       .B--stopB.: Stop the server.       .B--keep-mysqlB.: Do not shut down MySQL process when exiting    the start script. Useful during development    or any other scenario where the start script    is frequently terminated.    +  .B--mysql-onlyB.: Start the embedded MySQL process, but +  do not start the rest of Roxen. May be +  combined with --stop. +     .B--gdbB.: Run the server in gdb. Implies .B--onceB..       .B--valgrind[=valgrind args]B.: Run the server in valgrind. Implies .B--onceB..       .B--programB.: Start a different program with the Roxen    Pike. As an example,    .B./start --program bin/install.pikeB. will    start the installation program normally    started with .B./installB.   
Roxen.git/server/start:1097:    dp "or are not associated with this configuration."    dp "Stale pid file? Deleting the pid file."    rm "$pidfile"    :    fi    else    dp "There is a pid file $pidfile,"    dp "but it seems to be truncated."    exit 1    fi < "$pidfile" +  +  if [ "x$keep_mysql" = "x2" ]; then +  stop_mysql; +  fi +  elif [ "x$keep_mysql" = "x2" ]; then +  stop_mysql;    else    dp "The pid file $pidfile does not exist."    dp "The server is probably not running."    fi    exit    fi    # Avoid duplicate start scripts if we got a pid file.    test -f "$pidfile" && {    if read roxenpid && read scriptpid; then    if roxenp "$scriptpid" "start" "$canonicalconf" 2>/dev/null ; then