|
@@ -18,6 +18,7 @@ package main
|
|
|
|
|
|
import (
|
|
import (
|
|
"flag"
|
|
"flag"
|
|
|
|
+ "fmt"
|
|
"log"
|
|
"log"
|
|
"net"
|
|
"net"
|
|
"os"
|
|
"os"
|
|
@@ -29,8 +30,10 @@ import (
|
|
"time"
|
|
"time"
|
|
)
|
|
)
|
|
|
|
|
|
-var VERSION string = "2.2.7"
|
|
|
|
|
|
+var VERSION string = "2.2.8"
|
|
|
|
+var buildTime string
|
|
var gitVersion string
|
|
var gitVersion string
|
|
|
|
+
|
|
var serverId string
|
|
var serverId string
|
|
var serverIP string
|
|
var serverIP string
|
|
var serverGroups []string
|
|
var serverGroups []string
|
|
@@ -47,6 +50,8 @@ var (
|
|
flaglog = flag.Bool("log", false, "be more verbose")
|
|
flaglog = flag.Bool("log", false, "be more verbose")
|
|
flagcpus = flag.Int("cpus", 1, "Set the maximum number of CPUs to use")
|
|
flagcpus = flag.Int("cpus", 1, "Set the maximum number of CPUs to use")
|
|
|
|
|
|
|
|
+ flagShowVersion = flag.Bool("version", false, "Show dnsconfig version")
|
|
|
|
+
|
|
cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file")
|
|
cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file")
|
|
memprofile = flag.String("memprofile", "", "write memory profile to this file")
|
|
memprofile = flag.String("memprofile", "", "write memory profile to this file")
|
|
)
|
|
)
|
|
@@ -63,6 +68,11 @@ func init() {
|
|
func main() {
|
|
func main() {
|
|
flag.Parse()
|
|
flag.Parse()
|
|
|
|
|
|
|
|
+ if *flagShowVersion {
|
|
|
|
+ fmt.Println("geodns", VERSION, buildTime)
|
|
|
|
+ os.Exit(0)
|
|
|
|
+ }
|
|
|
|
+
|
|
if len(*flagidentifier) > 0 {
|
|
if len(*flagidentifier) > 0 {
|
|
ids := strings.Split(*flagidentifier, ",")
|
|
ids := strings.Split(*flagidentifier, ",")
|
|
serverId = ids[0]
|
|
serverId = ids[0]
|