Skip to content

Commit

Permalink
Update macos paths in service
Browse files Browse the repository at this point in the history
  • Loading branch information
zachhuff386 committed Apr 26, 2020
1 parent 53e3614 commit 47afe0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 3 additions & 1 deletion service/profile/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,7 @@ func (p *Profile) clearWgMac() {
[]string{
"is not a",
},
"/usr/local/bin/bash",
p.wgQuickPath,
"down", p.Iface,
)
Expand Down Expand Up @@ -2127,7 +2128,7 @@ func (p *Profile) confWgMac() (err error) {
output := ""
for i := 0; i < 3; i++ {
_, _ = utils.ExecOutput(
p.wgQuickPath, "down", p.Iface,
"/usr/local/bin/bash", p.wgQuickPath, "down", p.Iface,
)

if i == 0 {
Expand All @@ -2138,6 +2139,7 @@ func (p *Profile) confWgMac() (err error) {

output, err = utils.ExecOutputLogged(
nil,
"/usr/local/bin/bash",
p.wgQuickPath,
"up", p.Iface,
)
Expand Down
8 changes: 1 addition & 7 deletions service/profile/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,7 @@ func GetWgQuickPath() string {

break
case "darwin":
path, _ := exec.LookPath(
"/Applications/Pritunl.app/Contents/Resources/wg-quick")
if path != "" {
return path
}

path, _ = exec.LookPath("/usr/bin/wg-quick")
path, _ := exec.LookPath("/usr/bin/wg-quick")
if path != "" {
return path
}
Expand Down

0 comments on commit 47afe0e

Please sign in to comment.