diff options
| -rw-r--r-- | meta-webserver/recipes-webadmin/netdata/netdata/netdata.service | 12 | ||||
| -rw-r--r-- | meta-webserver/recipes-webadmin/netdata/netdata_git.bb | 19 |
2 files changed, 21 insertions, 10 deletions
diff --git a/meta-webserver/recipes-webadmin/netdata/netdata/netdata.service b/meta-webserver/recipes-webadmin/netdata/netdata/netdata.service index b244d18665..ca13f72871 100644 --- a/meta-webserver/recipes-webadmin/netdata/netdata/netdata.service +++ b/meta-webserver/recipes-webadmin/netdata/netdata/netdata.service | |||
| @@ -1,13 +1,15 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-3.0-or-later | ||
| 1 | [Unit] | 2 | [Unit] |
| 2 | Description=Netdata, Real-time performance monitoring | 3 | Description=Real time performance monitoring |
| 3 | RequiresMountsFor=/var | 4 | RequiresMountsFor=/var |
| 5 | After=network.target | ||
| 4 | 6 | ||
| 5 | [Service] | 7 | [Service] |
| 6 | User=root | 8 | Type=simple |
| 7 | ExecStartPre=/bin/mkdir -p /var/log/netdata | 9 | ExecStartPre=/bin/mkdir -p /var/log/netdata |
| 8 | ExecStartPre=/bin/chown -R nobody.netdata @@datadir/netdata/web | 10 | ExecStartPre=/bin/chown -R netdata.netdata /var/log/netdata |
| 9 | ExecStartPre=/bin/chown -R nobody.netdata /var/cache/netdata | 11 | ExecStart=/usr/sbin/netdata -D -u netdata |
| 10 | ExecStart=/usr/sbin/netdata -nd | 12 | |
| 11 | 13 | ||
| 12 | [Install] | 14 | [Install] |
| 13 | WantedBy=multi-user.target | 15 | WantedBy=multi-user.target |
diff --git a/meta-webserver/recipes-webadmin/netdata/netdata_git.bb b/meta-webserver/recipes-webadmin/netdata/netdata_git.bb index 7c48b8a37d..7ec9898152 100644 --- a/meta-webserver/recipes-webadmin/netdata/netdata_git.bb +++ b/meta-webserver/recipes-webadmin/netdata/netdata_git.bb | |||
| @@ -1,17 +1,19 @@ | |||
| 1 | HOMEPAGE = "https://github.com/firehol/netdata/" | 1 | HOMEPAGE = "https://github.com/netdata/netdata/" |
| 2 | SUMMARY = "Real-time performance monitoring" | 2 | SUMMARY = "Real-time performance monitoring" |
| 3 | DESCRIPTION = "Netdata is high-fidelity infrastructure monitoring and troubleshooting. \ | ||
| 4 | Open-source, free, preconfigured, opinionated, and always real-time." | ||
| 3 | LICENSE = "GPLv3" | 5 | LICENSE = "GPLv3" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24" |
| 5 | 7 | ||
| 6 | SRC_URI = "git://github.com/firehol/netdata.git;protocol=https" | 8 | SRC_URI:append = " git://github.com/firehol/netdata.git;protocol=https" |
| 7 | SRCREV = "1be9200ba8e11dc81a2101d85a2725137d43f766" | 9 | SRCREV = "1be9200ba8e11dc81a2101d85a2725137d43f766" |
| 8 | PV = "1.22.1" | 10 | PV = "1.22.1" |
| 9 | 11 | ||
| 10 | # default netdata.conf for netdata configuration | 12 | # default netdata.conf for netdata configuration |
| 11 | SRC_URI += "file://netdata.conf" | 13 | SRC_URI += " file://netdata.conf" |
| 12 | 14 | ||
| 13 | # file for providing systemd service support | 15 | # file for providing systemd service support |
| 14 | SRC_URI += "file://netdata.service" | 16 | SRC_URI += " file://netdata.service" |
| 15 | 17 | ||
| 16 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
| 17 | 19 | ||
| @@ -31,7 +33,7 @@ SYSTEMD_AUTO_ENABLE:${PN} = "enable" | |||
| 31 | 33 | ||
| 32 | #User specific | 34 | #User specific |
| 33 | USERADD_PACKAGES = "${PN}" | 35 | USERADD_PACKAGES = "${PN}" |
| 34 | GROUPADD_PARAM:${PN} = "--system netdata" | 36 | USERADD_PARAM:${PN} = "--system --no-create-home --home-dir ${localstatedir}/run/netdata --user-group netdata" |
| 35 | 37 | ||
| 36 | do_install:append() { | 38 | do_install:append() { |
| 37 | #set S UID for plugins | 39 | #set S UID for plugins |
| @@ -50,6 +52,13 @@ do_install:append() { | |||
| 50 | sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf | 52 | sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf |
| 51 | sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf | 53 | sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf |
| 52 | sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf | 54 | sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf |
| 55 | |||
| 56 | install --group netdata --owner netdata --directory ${D}${localstatedir}/cache/netdata | ||
| 57 | install --group netdata --owner netdata --directory ${D}${localstatedir}/lib/netdata | ||
| 58 | |||
| 59 | chown -R netdata:netdata ${D}${datadir}/netdata/web | ||
| 53 | } | 60 | } |
| 54 | 61 | ||
| 62 | FILES_${PN} += "${localstatedir}/cache/netdata/ ${localstatedir}/lib/netdata/" | ||
| 63 | |||
| 55 | RDEPENDS:${PN} = "bash zlib" | 64 | RDEPENDS:${PN} = "bash zlib" |
