mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 01:07:41 +08:00
began adding macos service/daemon
This commit is contained in:
24
netclient/daemon/common.go
Normal file
24
netclient/daemon/common.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package daemon
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"runtime"
|
||||
|
||||
"github.com/gravitl/netmaker/netclient/config"
|
||||
)
|
||||
|
||||
func InstallDaemon(cfg config.ClientConfig) error {
|
||||
os := runtime.GOOS
|
||||
var err error
|
||||
switch os {
|
||||
case "windows":
|
||||
err = SetupWindowsDaemon()
|
||||
case "darwin":
|
||||
err = errors.New("need to implement macos daemon0")
|
||||
case "linux":
|
||||
err = SetupSystemDDaemon(cfg.Network)
|
||||
default:
|
||||
err = errors.New("this os is not yet supported for daemon mode. Run join cmd with flag '--daemon off'")
|
||||
}
|
||||
return err
|
||||
}
|
Reference in New Issue
Block a user