Skip to content

Commit

Permalink
stats: dont use sudo
Browse files Browse the repository at this point in the history
you dont need sudo inside docker container
  • Loading branch information
inciner8r committed Jan 19, 2024
1 parent f5304a5 commit 6392167
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/pkg/stats/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

func GetWireGuardStats() (map[string]map[string]int64, error) {
cmd := exec.Command("sudo", "wg", "show", "all", "transfer")
cmd := exec.Command("wg", "show", "all", "transfer")

output, err := cmd.CombinedOutput()
if err != nil {
Expand Down Expand Up @@ -43,7 +43,7 @@ type WireGuardStats struct {
}

func GetWireGuardStatsForPeer(publicKey string) (*WireGuardStats, error) {
cmd := exec.Command("sudo", "wg", "show", "all", "transfer")
cmd := exec.Command("wg", "show", "all", "transfer")

output, err := cmd.CombinedOutput()
if err != nil {
Expand Down

0 comments on commit 6392167

Please sign in to comment.