netdata: permissions fix and default config
resolves #5623 Closes: #5624 [via git-merge-pr]
This commit is contained in:
parent
6d0fdfbe5a
commit
9b9b792a21
4 changed files with 19 additions and 3 deletions
|
@ -1,7 +1,6 @@
|
|||
case ${ACTION} in
|
||||
post)
|
||||
chown _netdata:root var/lib/netdata/registry/
|
||||
chown -R _netdata:_netdata usr/share/netdata/web
|
||||
chown root usr/libexec/netdata/plugins.d/apps.plugin
|
||||
chmod 0755 usr/libexec/netdata/plugins.d/apps.plugin
|
||||
setcap cap_dac_read_search,cap_sys_ptrace+ep usr/libexec/netdata/plugins.d/apps.plugin
|
||||
|
|
14
srcpkgs/netdata/files/netdata.conf
Normal file
14
srcpkgs/netdata/files/netdata.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
# NetData Configuration
|
||||
#
|
||||
# To see defaults, grab one from your instance:
|
||||
# http://localhost:19999/netdata.conf
|
||||
|
||||
# global netdata configuration
|
||||
|
||||
[global]
|
||||
run as user = _netdata
|
||||
web files owner = root
|
||||
web files group = root
|
||||
# Netdata is not designed to be exposed to potentially hostile networks
|
||||
# See https://github.com/firehol/netdata/issues/164
|
||||
bind to = localhost
|
|
@ -5,4 +5,4 @@ for f in cache log; do
|
|||
chown -R _netdata:_netdata /var/${f}/netdata
|
||||
done
|
||||
|
||||
exec netdata -u _netdata -D
|
||||
exec chpst -u _netdata:_netdata netdata -D
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'netdata'
|
||||
pkgname=netdata
|
||||
version=1.5.0
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=gnu-configure
|
||||
hostmakedepends="pkg-config"
|
||||
makedepends="zlib-devel"
|
||||
|
@ -18,11 +18,13 @@ checksum=764212e1c71dbf5cbcd0cc391b7be0ffd4fcfd5e3b603b4fdb4e0b21a9286dd8
|
|||
|
||||
post_install() {
|
||||
vsv netdata
|
||||
vcopy ${FILESDIR}/netdata.conf etc/$pkgname/
|
||||
}
|
||||
|
||||
netdata-plugins-nodejs_package() {
|
||||
short_desc+=" - NodeJS Plugins"
|
||||
depends="${sourcepkg}>=${version}_${revision} nodejs"
|
||||
noarch=yes
|
||||
pkg_install() {
|
||||
vmove usr/libexec/netdata/plugins.d/node.d.plugin
|
||||
vmove usr/libexec/netdata/node.d
|
||||
|
@ -32,6 +34,7 @@ netdata-plugins-nodejs_package() {
|
|||
netdata-plugins-python_package() {
|
||||
short_desc+=" - Python Plugins"
|
||||
depends="${sourcepkg}>=${version}_${revision} python"
|
||||
noarch=yes
|
||||
pkg_install() {
|
||||
vmove usr/libexec/netdata/plugins.d/python.d.plugin
|
||||
vmove usr/libexec/netdata/python.d
|
||||
|
|
Loading…
Reference in a new issue