From c922ba3a4f07f9963b52e0987511ee80cda92e1d Mon Sep 17 00:00:00 2001 From: Michele Meloni Date: Mon, 18 May 2020 00:21:52 +0200 Subject: [PATCH] fix(cmd/immuadmin/command/service): fix #188 --- .../command/service/configs/immudb.toml.linux.dist.go | 2 +- cmd/immuadmin/command/service/helper_unix.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/immuadmin/command/service/configs/immudb.toml.linux.dist.go b/cmd/immuadmin/command/service/configs/immudb.toml.linux.dist.go index 04de34c5ce..3eabc0a50a 100644 --- a/cmd/immuadmin/command/service/configs/immudb.toml.linux.dist.go +++ b/cmd/immuadmin/command/service/configs/immudb.toml.linux.dist.go @@ -23,7 +23,7 @@ network = "tcp" address = "127.0.0.1" port = 3322 dbname = "data" -pidfile = "/var/run/immudb.pid" +pidfile = "/var/lib/immudb/immudb.pid" logfile = "/var/log/immudb/immudb.log" mtls = false detached = false diff --git a/cmd/immuadmin/command/service/helper_unix.go b/cmd/immuadmin/command/service/helper_unix.go index c2947e7075..7f940853e9 100644 --- a/cmd/immuadmin/command/service/helper_unix.go +++ b/cmd/immuadmin/command/service/helper_unix.go @@ -57,8 +57,7 @@ After={{.Dependencies}} [Service] -PIDFile=/var/run/{{.Name}}.pid -ExecStartPre=/bin/rm -f /var/run/{{.Name}}.pid +ExecStartPre=/bin/rm -f /var/lib/immudb/{{.Name}}.pid ExecStart={{.Path}} {{.Args}} Restart=on-failure User=%s