From 32c5b1c037a6271145a5e0f40c988f411e952233 Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Thu, 27 Feb 2020 22:52:57 +0000 Subject: [PATCH] add main help --- cmd/dsnet.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/cmd/dsnet.go b/cmd/dsnet.go index 59aef9a..8df7e88 100644 --- a/cmd/dsnet.go +++ b/cmd/dsnet.go @@ -3,6 +3,7 @@ package main import ( "os" "flag" + "fmt" "github.com/naggie/dsnet" ) @@ -12,6 +13,7 @@ func main() { switch os.Args[1] { case "init": + dsnet.Init() case "up": @@ -25,3 +27,18 @@ func main() { help(); } } + +func help() { + fmt.Printf(`Usage: dsnet + +Available commands: + + init : Create %s containing default configuration + new keys without loading. Edit to taste. + add : Generate configuration for a new peer. (Send with passworded ffsend) + sync : Synchronise wireguard configuration with %s, creating and activating interface if necessary + +To remove an interface or bring it down, use standard tools such as iproute2. +To modify or remove peers, edit %s and then run sync. + +`, dstask.CONFIG_FILE, dstask.CONFIG_FILE, dstask.CONFIG_FILE) +}