From 2214280f98682c8a7c9dc3677d12c3d8a811f8b4 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 29 Dec 2016 22:27:30 +0100 Subject: make snd directory configurable diff --git a/src/rhlibrary/main.go b/src/rhlibrary/main.go index 1285dd3..94a5a06 100644 --- a/src/rhlibrary/main.go +++ b/src/rhlibrary/main.go @@ -76,6 +76,8 @@ func (s *envStringValue) String() string { return fmt.Sprintf("%s", *s) } func main() { rdconf := newEnvStringValue("RHLIBRARY_RD_CONF", "/etc/rd.conf") flag.Var(rdconf, "rdconf", "path to the Rivendell config file (environment: RHLIBRARY_RD_CONF)") + sndDir := newEnvStringValue("RHLIBRARY_SND_DIR", "/var/snd") + flag.Var(sndDir, "snddir", "path to the Rivendell snd directory (environment: RHLIBRARY_SND_DIR)") help := flag.Bool("help", false, "show usage") flag.Parse() @@ -93,7 +95,7 @@ func main() { } defer db.Cleanup() - p, err := player.NewPlayer("/var/snd", rhl, rhdl) + p, err := player.NewPlayer(sndDir.Get().(string), rhl, rhdl) if err != nil { rhl.Println("Error initializing Player:", err) return -- cgit v0.10.2