summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@gmail.com>2018-06-08 22:04:37 +0200
committerPatrice Clement <monsieurp@gentoo.org>2018-06-12 10:46:14 +0200
commitb69b2e648f0b668e3f5b8cec5e8a64cc33feed19 (patch)
tree2f704c97338f7b754ed5f7d040c2f5264f67c76d /www-apps
parentsys-process/psmisc: stable 23.1-r1 for ia64, bug #657920 (diff)
downloadgentoo-b69b2e648f0b668e3f5b8cec5e8a64cc33feed19.tar.gz
gentoo-b69b2e648f0b668e3f5b8cec5e8a64cc33feed19.tar.bz2
gentoo-b69b2e648f0b668e3f5b8cec5e8a64cc33feed19.zip
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
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/grafana-bin/files/grafana.service3
1 files changed, 2 insertions, 1 deletions
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