Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1147:    if [ "$stop" != "TERM" ]; then    exit 1    fi    fi    if [ "$start"x = x ]; then    exit 0    fi    fi    # Avoid duplicate start scripts if we got a pid file.    if [ -f "$pidfile" ]; then -  { +  (    if read roxenpid && read scriptpid; then    if roxenp "$scriptpid" "start" "$canonicalconf" 2>/dev/null ; then    if [ "$stop"x = x ]; then    dp "According to the pid file $pidfile,"    dp "there is already a start script running with pid $scriptpid. Specify "    dp "another pid file with --pid-file if this is a different server."    dp "Server not started."    exit 1    fi    dp "The old start script (pid $scriptpid) should now restart the server."    exit 2    elif roxenp "$roxenpid" "server" "$canonicalconf" 2>/dev/null ; then    dp "According to the pid file $pidfile,"    dp "there is already a server running with pid $roxenpid, but its start "    dp "script seems to have died. You should shut it down and restart "    dp "it, since it won't restart automatically. Server not started."    exit 1    fi    fi -  } < "$pidfile" || { +  ) < "$pidfile" || {    # NB: The exits above just exit the subshell used for the    # redirect. Adjust the exit codes and exit for real.    [ "$?" = "2" ];    exit;    }    fi    # Minor race here.    lock_pid_file $start_pid "start" "$canonicalconf"    { echo "x" && echo $start_pid; } > "$pidfile"    trap cleanup_start_pid_file 0