From 50736ab633a097907ca4f261f0b204dfb75b3d78 Mon Sep 17 00:00:00 2001 From: Bernhard B Date: Fri, 25 Feb 2022 18:41:30 +0100 Subject: [PATCH] fixed bug in jsonrpc2-helper * golang doesn't automatically expand env variables in exec.Command --- src/scripts/jsonrpc2-helper.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/jsonrpc2-helper.go b/src/scripts/jsonrpc2-helper.go index 0d8996e..9d230ee 100644 --- a/src/scripts/jsonrpc2-helper.go +++ b/src/scripts/jsonrpc2-helper.go @@ -73,7 +73,9 @@ func main() { log.Fatal("Couldn't create fifo with name ", fifoPathname, ": ", err.Error()) } - _, err = exec.Command("chown", "${SIGNAL_CLI_UID}:${SIGNAL_CLI_GID}", fifoPathname).Output() + uid := utils.GetEnv("SIGNAL_CLI_UID", "1000") + gid := utils.GetEnv("SIGNAL_CLI_GID", "1000") + _, err = exec.Command("chown", uid + ":" + gid, fifoPathname).Output() if err != nil { log.Fatal("Couldn't change permissions of fifo with name ", fifoPathname, ": ", err.Error()) }