Blob Blame History Raw
--- main.go.orig	2022-02-11 15:41:53.199642591 -0500
+++ main.go	2022-02-11 15:42:43.738219604 -0500
@@ -6,6 +6,7 @@
 	"fmt"
 	"net"
 	"os"
+	"path/filepath"
 	"strconv"
 	"strings"
 	"time"
@@ -21,7 +22,7 @@
 )
 
 func main() {
-	fs := flag.NewFlagSet("yggd-package-manager-worker", flag.ExitOnError)
+	fs := flag.NewFlagSet(filepath.Base(os.Args[0]), flag.ExitOnError)
 
 	var (
 		socketAddr    = ""
@@ -32,7 +33,7 @@
 	fs.StringVar(&socketAddr, "socket-addr", "", "dispatcher socket address")
 	fs.Var(&logLevel, "log-level", "log verbosity level (error (default), warn, info, debug, trace)")
 	fs.Var(&allowPatterns, "allow-pattern", "regular expression pattern to allow package operations\n(can be specified multiple times)")
-	_ = fs.String("config", "", "path to `file` containing configuration values (optional)")
+	_ = fs.String("config", filepath.Join("/", "etc", "rhc", "workers", fs.Name()+".toml"), "path to `file` containing configuration values (optional)")
 
 	ff.Parse(fs, os.Args[1:], ff.WithEnvVarPrefix("YGG"), ff.WithConfigFileFlag("config"), ff.WithConfigFileParser(fftoml.Parser))