diff --git a/plugins.go b/plugins.go index bf2397806..668c51654 100644 --- a/plugins.go +++ b/plugins.go @@ -1,8 +1,10 @@ package main import ( + "fmt" "log" "path/filepath" + "runtime" ) // globalPluginDirs returns directories that should be searched for @@ -18,7 +20,8 @@ func globalPluginDirs() []string { if err != nil { log.Printf("[ERROR] Error finding global config directory: %s", err) } else { - ret = append(ret, filepath.Join(dir, "plugins")) + machineDir := fmt.Sprintf("%s_%s", runtime.GOOS, runtime.GOARCH) + ret = append(ret, filepath.Join(dir, "plugins", machineDir)) } return ret