Skip to content

Commit

Permalink
Fixed WireGuard down error
Browse files Browse the repository at this point in the history
  • Loading branch information
bsrinivas8687 committed Feb 20, 2023
1 parent c0ddac1 commit 786ded6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions services/wireguard/wireguard_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,10 @@ func (s *WireGuard) Up() error {
}

func (s *WireGuard) Down() error {
iFace, err := s.realInterface()
if err != nil {
return err
}

cmd := exec.Command(
s.execFile("wg-quick"),
strings.Split(
fmt.Sprintf("down %s", iFace),
fmt.Sprintf("down %s", s.configFilePath()),
" ",
)...,
)
Expand Down
7 changes: 1 addition & 6 deletions services/wireguard/wireguard_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,10 @@ func (s *WireGuard) Up() error {
}

func (s *WireGuard) Down() error {
iFace, err := s.realInterface()
if err != nil {
return err
}

cmd := exec.Command(
s.execFile("wg-quick"),
strings.Split(
fmt.Sprintf("down %s", iFace),
fmt.Sprintf("down %s", s.configFilePath()),
" ",
)...,
)
Expand Down

0 comments on commit 786ded6

Please sign in to comment.