summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gorum/main.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/cmd/gorum/main.go b/cmd/gorum/main.go
new file mode 100644
index 0000000..223da9d
--- /dev/null
+++ b/cmd/gorum/main.go
@@ -0,0 +1,28 @@
+package main
+
+import (
+ "context"
+ "flag"
+ "fmt"
+
+ "codeberg.org/snonux/gorum/internal"
+)
+
+const versionStr = "v0.0.0"
+
+func main() {
+ configFile := flag.String("cfg", "/etc/gorum.json", "The config file")
+ version := flag.Bool("version", false, "Display version")
+ flag.Parse()
+
+ if *version {
+ fmt.Printf("This is Gorum version %s; (C) by Paul Buetow\n", versionStr)
+ fmt.Println("https://codeberg.org/snonux/gorum")
+ return
+ }
+
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ internal.Run(ctx, *configFile)
+}