add main help
This commit is contained in:
parent
109b1d35b3
commit
32c5b1c037
17
cmd/dsnet.go
17
cmd/dsnet.go
@ -3,6 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"flag"
|
"flag"
|
||||||
|
"fmt"
|
||||||
"github.com/naggie/dsnet"
|
"github.com/naggie/dsnet"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -12,6 +13,7 @@ func main() {
|
|||||||
|
|
||||||
switch os.Args[1] {
|
switch os.Args[1] {
|
||||||
case "init":
|
case "init":
|
||||||
|
dsnet.Init()
|
||||||
|
|
||||||
case "up":
|
case "up":
|
||||||
|
|
||||||
@ -25,3 +27,18 @@ func main() {
|
|||||||
help();
|
help();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func help() {
|
||||||
|
fmt.Printf(`Usage: dsnet <cmd>
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user