1 |
commit: b69b2e648f0b668e3f5b8cec5e8a64cc33feed19 |
2 |
Author: Aleksander Mistewicz <a.mistewicz <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Jun 8 20:04:37 2018 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 12 08:46:14 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b69b2e64 |
7 |
|
8 |
www-apps/grafana: fix pid file permission. |
9 |
|
10 |
Due to a fact that the service is running as a user named grafana, the process |
11 |
did not have permissions to create a file in /run. It could be mitigated by |
12 |
changing permissions of /run or running service as privileged user or avoiding |
13 |
systemd. This patch moves pid file to subdirectory and adds RuntimeDirectory |
14 |
entry to the definition of the service. |
15 |
|
16 |
Closes: https://bugs.gentoo.org/628328 |
17 |
|
18 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
19 |
Closes: https://github.com/gentoo/gentoo/pull/8765 |
20 |
|
21 |
www-apps/grafana-bin/files/grafana.service | 3 ++- |
22 |
1 file changed, 2 insertions(+), 1 deletion(-) |
23 |
|
24 |
diff --git a/www-apps/grafana-bin/files/grafana.service b/www-apps/grafana-bin/files/grafana.service |
25 |
index 66fefe67e3e..dcf1de295ee 100644 |
26 |
--- a/www-apps/grafana-bin/files/grafana.service |
27 |
+++ b/www-apps/grafana-bin/files/grafana.service |
28 |
@@ -9,10 +9,11 @@ User=grafana |
29 |
Group=grafana |
30 |
Type=simple |
31 |
Restart=on-failure |
32 |
+RuntimeDirectory=grafana |
33 |
WorkingDirectory=/usr/share/grafana |
34 |
ExecStart=/usr/bin/grafana-server \ |
35 |
--config=/etc/grafana/grafana.ini \ |
36 |
- --pidfile=/run/grafana.pid \ |
37 |
+ --pidfile=/run/grafana/grafana.pid \ |
38 |
cfg:default.paths.logs=/var/log/grafana \ |
39 |
cfg:default.paths.data=/var/lib/grafana \ |
40 |
cfg:default.paths.plugins=/var/lib/grafana/plugins |