mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-11 15:44:52 +08:00
Merge pull request #1086 from gravitl/feature_v0.14.0_optional_daemon
made daemon install optional and changed mac logging path
This commit is contained in:
commit
d2d8f47346
4 changed files with 6 additions and 14 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -20,4 +20,4 @@ controllers/data/
|
|||
data/
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
netmaker.exe
|
||||
|
|
|
@ -96,8 +96,8 @@ func MacDaemonString() string {
|
|||
<string>/usr/local/bin/netclient</string>
|
||||
<string>daemon</string>
|
||||
</array>
|
||||
<key>StandardOutPath</key><string>/etc/netclient/com.gravitl.netclient.log</string>
|
||||
<key>StandardErrorPath</key><string>/etc/netclient/com.gravitl.netclient.log</string>
|
||||
<key>StandardOutPath</key><string>/var/log/com.gravitl.netclient.log</string>
|
||||
<key>StandardErrorPath</key><string>/var/log/com.gravitl.netclient.log</string>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
|
|
|
@ -108,14 +108,6 @@ func JoinNetwork(cfg *config.ClientConfig, privateKey string) error {
|
|||
}
|
||||
}
|
||||
|
||||
// if ncutils.IsLinux() {
|
||||
// _, err := exec.LookPath("resolvectl")
|
||||
// if err != nil {
|
||||
// logger.Log("resolvectl not present", 2)
|
||||
// logger.Log("unable to configure DNS automatically, disabling automated DNS management", 2)
|
||||
// cfg.Node.DNSOn = "no"
|
||||
// }
|
||||
// }
|
||||
if ncutils.IsFreeBSD() {
|
||||
cfg.Node.UDPHolePunch = "no"
|
||||
}
|
||||
|
@ -195,14 +187,14 @@ func JoinNetwork(cfg *config.ClientConfig, privateKey string) error {
|
|||
|
||||
_ = UpdateLocalListenPort(cfg)
|
||||
|
||||
if cfg.Daemon != "off" {
|
||||
if cfg.Daemon == "install" || ncutils.IsFreeBSD() {
|
||||
err = daemon.InstallDaemon(cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
} else {
|
||||
daemon.Restart()
|
||||
}
|
||||
}
|
||||
|
||||
daemon.Restart()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
BIN
netmaker.exe
BIN
netmaker.exe
Binary file not shown.
Loading…
Add table
Reference in a new issue