netbird/client/cmd/service.go

37 lines
697 B
Go
Raw Normal View History

2021-06-19 14:55:45 +02:00
package cmd
import (
"github.com/kardianos/service"
log "github.com/sirupsen/logrus"
2021-06-19 14:55:45 +02:00
"github.com/spf13/cobra"
)
type program struct {
cmd *cobra.Command
args []string
}
2021-06-19 14:55:45 +02:00
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.",
2021-06-19 14:55:45 +02:00
}
}
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
}
2021-06-19 14:55:45 +02:00
var (
serviceCmd = &cobra.Command{
Use: "service",
Short: "manages wiretrustee service",
}
)