commit: b69b2e648f0b668e3f5b8cec5e8a64cc33feed19 Author: Aleksander Mistewicz <a.mistewicz <AT> gmail <DOT> com> AuthorDate: Fri Jun 8 20:04:37 2018 +0000 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> CommitDate: Tue Jun 12 08:46:14 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b69b2e64
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(-) diff --git a/www-apps/grafana-bin/files/grafana.service b/www-apps/grafana-bin/files/grafana.service index 66fefe67e3e..dcf1de295ee 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
