netdata: switch user to _netdata; fix webroot; fix permissions.

This commit is contained in:
Juan RP 2016-05-01 11:05:33 +02:00
parent 48f9ae48c9
commit 05fd281717
3 changed files with 11 additions and 5 deletions

View file

@ -1,6 +1,7 @@
case ${ACTION} in
post)
chown root:netdata usr/libexec/netdata/plugins.d/apps.plugin
chown -R _netdata:_netdata usr/share/netdata/webroot
chown root:_netdata usr/libexec/netdata/plugins.d/apps.plugin
chmod 4750 usr/libexec/netdata/plugins.d/apps.plugin
;;
esac

View file

@ -1,3 +1,8 @@
#!/bin/sh
exec netdata -nd
for f in cache log; do
mkdir -p /var/${f}/netdata
chown -R _netdata:_netdata /var/${f}/netdata
done
exec netdata -u netdata -nd

View file

@ -1,13 +1,13 @@
# Template file for 'netdata'
pkgname=netdata
version=1.1.0
revision=1
revision=2
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="zlib-devel"
system_accounts="netdata"
system_accounts="_netdata"
conf_files="/etc/${pkgname}/*.conf"
configure_args="--with-user=netdata --with-webroot=/usr/share/${pkgname}/webroot"
configure_args="--with-user=_netdata --with-webdir=/usr/share/${pkgname}/webroot"
short_desc="Real-time performance monitoring, done right"
maintainer="Michael Aldridge <aldridge.mac@gmail.com>"
license="GPL-3"