From b69b2e648f0b668e3f5b8cec5e8a64cc33feed19 Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Fri, 8 Jun 2018 22:04:37 +0200 Subject: www-apps/grafana: fix pid file permission. Due to a fact that the service is running as a user named grafana, the process did not have permissions to create a file in /run. It could be mitigated by changing permissions of /run or running service as privileged user or avoiding systemd. This patch moves pid file to subdirectory and adds RuntimeDirectory entry to the definition of the service. Closes: https://bugs.gentoo.org/628328 Package-Manager: Portage-2.3.19, Repoman-2.3.6 Closes: https://github.com/gentoo/gentoo/pull/8765 --- www-apps/grafana-bin/files/grafana.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'www-apps') diff --git a/www-apps/grafana-bin/files/grafana.service b/www-apps/grafana-bin/files/grafana.service index 66fefe67e3ee..dcf1de295eed 100644 --- a/www-apps/grafana-bin/files/grafana.service +++ b/www-apps/grafana-bin/files/grafana.service @@ -9,10 +9,11 @@ User=grafana Group=grafana Type=simple Restart=on-failure +RuntimeDirectory=grafana WorkingDirectory=/usr/share/grafana ExecStart=/usr/bin/grafana-server \ --config=/etc/grafana/grafana.ini \ - --pidfile=/run/grafana.pid \ + --pidfile=/run/grafana/grafana.pid \ cfg:default.paths.logs=/var/log/grafana \ cfg:default.paths.data=/var/lib/grafana \ cfg:default.paths.plugins=/var/lib/grafana/plugins -- cgit v1.2.3-18-g5258