Browse Source

Expand scope of -identifier option

Start adding concept of server groups
Ask Bjørn Hansen 12 years ago
parent
commit
cbadda9bac
1 changed files with 6 additions and 1 deletions
  1. 6 1
      geodns.go

+ 6 - 1
geodns.go

@@ -33,6 +33,7 @@ var VERSION string = "2.2.3"
 var gitVersion string
 var serverId string
 var serverIP string
+var serverGroups []string
 
 var timeStarted = time.Now()
 var qCounter = expvar.NewInt("qCounter")
@@ -63,7 +64,11 @@ func main() {
 	flag.Parse()
 
 	if len(*flagidentifier) > 0 {
-		serverId = *flagidentifier
+		ids := strings.Split(*flagidentifier, ",")
+		serverId = ids[0]
+		if len(ids) > 1 {
+			serverGroups = ids[1:]
+		}
 	}
 
 	configFileName := filepath.Clean(*flagconfig + "/geodns.conf")