Skip to content

Commit

Permalink
Fix bad usage for exec
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed May 7, 2024
1 parent 63f6630 commit 9380493
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tun_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -820,9 +820,9 @@ func (t *NativeTun) setSearchDomainForSystemdResolved() {
if len(t.options.Inet6Address) > 0 {
dnsServer = append(dnsServer, t.options.Inet6Address[0].Addr().Next())
}
shell.Exec(ctlPath, "domain", t.options.Name, "~.").Start()
go shell.Exec(ctlPath, "domain", t.options.Name, "~.").Run()
if t.options.AutoRoute {
shell.Exec(ctlPath, "default-route", t.options.Name, "true").Start()
shell.Exec(ctlPath, append([]string{"dns", t.options.Name}, common.Map(dnsServer, netip.Addr.String)...)...).Start()
go shell.Exec(ctlPath, "default-route", t.options.Name, "true").Run()
go shell.Exec(ctlPath, append([]string{"dns", t.options.Name}, common.Map(dnsServer, netip.Addr.String)...)...).Run()
}
}

0 comments on commit 9380493

Please sign in to comment.