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
srcpkgs/netdata
INSTALL
files/netdata
template

View file

@ -1,6 +1,7 @@
case ${ACTION} in case ${ACTION} in
post) 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 chmod 4750 usr/libexec/netdata/plugins.d/apps.plugin
;; ;;
esac esac

View file

@ -1,3 +1,8 @@
#!/bin/sh #!/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' # Template file for 'netdata'
pkgname=netdata pkgname=netdata
version=1.1.0 version=1.1.0
revision=1 revision=2
build_style=gnu-configure build_style=gnu-configure
hostmakedepends="pkg-config" hostmakedepends="pkg-config"
makedepends="zlib-devel" makedepends="zlib-devel"
system_accounts="netdata" system_accounts="_netdata"
conf_files="/etc/${pkgname}/*.conf" 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" short_desc="Real-time performance monitoring, done right"
maintainer="Michael Aldridge <aldridge.mac@gmail.com>" maintainer="Michael Aldridge <aldridge.mac@gmail.com>"
license="GPL-3" license="GPL-3"