netbird/client/cmd/service.go
Maycon Santos 7bf9793f85
Support environment vars (#155)
* updage flag values from environment variables

* add log and removing unused constants

* removing unused code

* Docker build client

* fix indentation

* Documentation with docker command

* use docker volume
2021-11-15 09:11:50 +01:00

37 lines
697 B
Go

package cmd
import (
"github.com/kardianos/service"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
type program struct {
cmd *cobra.Command
args []string
}
func newSVCConfig() *service.Config {
return &service.Config{
Name: "wiretrustee",
DisplayName: "Wiretrustee",
Description: "A WireGuard-based mesh network that connects your devices into a single private network.",
}
}
func newSVC(prg *program, conf *service.Config) (service.Service, error) {
s, err := service.New(prg, conf)
if err != nil {
log.Fatal(err)
return nil, err
}
return s, nil
}
var (
serviceCmd = &cobra.Command{
Use: "service",
Short: "manages wiretrustee service",
}
)