Project

General

Profile

« Previous | Next » 

Revision 9d869ea3

Added by Eirik Oeverby almost 15 years ago

Fixed pattern matching for relayctl output (fixes vservers with spaces in name)

View differences:

usr/local/www/status_lb_vs.php
94 94
    $line = $rdr_a[$i];
95 95
    if (preg_match("/^[0-9]+/", $line)) {
96 96
      $regs = array();
97
      if($x = preg_match("/^[0-9]+\s+redirect\s+([0-9a-zA-Z]+)\s+([a-z]+)/", $line, $regs)) {
98
        $vs[$regs[1]] = array();
99
        $vs[$regs[1]]['status'] = $regs[2];
97
      if($x = preg_match("/^[0-9]+\s+redirect\s+([0-9a-zA-Z\s]+)\s+([a-z]+)/", $line, $regs)) {
98
        $vs[trim($regs[1])] = array();
99
        $vs[trim($regs[1])]['status'] = trim($regs[2]);
100 100
      }
101 101
    }
102 102
  }

Also available in: Unified diff