summary refs log tree commit diff
path: root/rvnitctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'rvnitctl.c')
-rw-r--r--rvnitctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/rvnitctl.c b/rvnitctl.c
index c6bec1a..7d48e01 100644
--- a/rvnitctl.c
+++ b/rvnitctl.c
@@ -13,7 +13,10 @@ main(int argc, char *argv[])
 		exit(2);
 	}
 
-	const char *path = "/tmp/rvnit.sock";
+	static const char default_sock[] = "/run/rvnit/rvnit.sock";
+	const char *path = getenv("RVNIT_SOCK");
+	if (!path || !*path)
+		path = default_sock;
 
 	struct sockaddr_un addr = { 0 };
 	addr.sun_family = AF_UNIX;