diff options
Diffstat (limited to 'meta-webserver/recipes-webadmin/netdata/netdata_git.bb')
| -rw-r--r-- | meta-webserver/recipes-webadmin/netdata/netdata_git.bb | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta-webserver/recipes-webadmin/netdata/netdata_git.bb b/meta-webserver/recipes-webadmin/netdata/netdata_git.bb new file mode 100644 index 0000000000..88e3692d6e --- /dev/null +++ b/meta-webserver/recipes-webadmin/netdata/netdata_git.bb | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | HOMEPAGE = "https://github.com/firehol/netdata/" | ||
| 2 | SUMMARY = "Real-time performance monitoring" | ||
| 3 | LICENSE = "GPLv3" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=747afe070ea9d6c2be0a31353609a35b" | ||
| 5 | |||
| 6 | SRC_URI = "git://github.com/firehol/netdata.git;protocol=https" | ||
| 7 | SRCREV = "36c1304e37094174ea51001903058e65053107ca" | ||
| 8 | |||
| 9 | # patch to disable timeout because timeout are not available with actual version | ||
| 10 | # of core-utils | ||
| 11 | SRC_URI += "file://0001-Correct-Timeout-issue.patch" | ||
| 12 | |||
| 13 | # default netdata.conf for netdata configuration | ||
| 14 | SRC_URI += "file://netdata.conf" | ||
| 15 | |||
| 16 | # file for providing systemd service support | ||
| 17 | SRC_URI += "file://netdata.service" | ||
| 18 | |||
| 19 | S = "${WORKDIR}/git" | ||
| 20 | |||
| 21 | inherit pkgconfig autotools useradd systemd | ||
| 22 | |||
| 23 | #systemd | ||
| 24 | SYSTEMD_PACKAGES = "${PN}" | ||
| 25 | SYSTEMD_SERVICE_${PN} = "netdata.service" | ||
| 26 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" | ||
| 27 | |||
| 28 | #User specific | ||
| 29 | USERADD_PACKAGES = "${PN}" | ||
| 30 | GROUPADD_PARAM_${PN} = "--system netdata" | ||
| 31 | |||
| 32 | do_install_append() { | ||
| 33 | #set S UID for plugins | ||
| 34 | chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin | ||
| 35 | |||
| 36 | if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
| 37 | # Install systemd unit files | ||
| 38 | install -d ${D}${systemd_unitdir}/system | ||
| 39 | install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system | ||
| 40 | sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service | ||
| 41 | fi | ||
| 42 | |||
| 43 | # Install default netdata.conf | ||
| 44 | install -d ${D}${sysconfdir}/netdata | ||
| 45 | install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir}/netdata/ | ||
| 46 | sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf | ||
| 47 | sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf | ||
| 48 | sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf | ||
| 49 | } | ||
| 50 | |||
| 51 | FILES_${PN}-dbg += "${libexecdir}/netdata/plugins.d/.debug" | ||
| 52 | RDEPENDS_${PN} = "bash zlib" | ||
