summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/collectd
diff options
context:
space:
mode:
authorChong.Lu@windriver.com <Chong.Lu@windriver.com>2014-09-18 09:23:59 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2014-09-26 05:41:53 +0200
commitf25843b7fa9acdfac980a581118190ca6bb7fbf3 (patch)
tree99ce97fbf7abf224b9df0aefe31936bb1bc8d0e9 /meta-oe/recipes-extended/collectd
parenta689cb8239360ba0c8b3e7934fe49fd8dfe449e8 (diff)
downloadmeta-openembedded-f25843b7fa9acdfac980a581118190ca6bb7fbf3.tar.gz
collectd: add systemd unit file
Add systemd unit file for collectd. Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/collectd')
-rw-r--r--meta-oe/recipes-extended/collectd/collectd/collectd.service12
-rw-r--r--meta-oe/recipes-extended/collectd/collectd_5.4.1.bb13
2 files changed, 23 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/collectd/collectd/collectd.service b/meta-oe/recipes-extended/collectd/collectd/collectd.service
new file mode 100644
index 000000000..d835b735f
--- /dev/null
+++ b/meta-oe/recipes-extended/collectd/collectd/collectd.service
@@ -0,0 +1,12 @@
1[Unit]
2Description=Collectd
3After=local-fs.target network.target
4Requires=local-fs.target network.target
5
6[Service]
7ExecStart=@SBINDIR@/collectd -C /etc/collectd.conf -f
8Restart=always
9RestartSec=10
10
11[Install]
12WantedBy=multi-user.target
diff --git a/meta-oe/recipes-extended/collectd/collectd_5.4.1.bb b/meta-oe/recipes-extended/collectd/collectd_5.4.1.bb
index dc5f88fd7..46752c895 100644
--- a/meta-oe/recipes-extended/collectd/collectd_5.4.1.bb
+++ b/meta-oe/recipes-extended/collectd/collectd_5.4.1.bb
@@ -9,11 +9,14 @@ SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \
9 file://no-gcrypt-badpath.patch \ 9 file://no-gcrypt-badpath.patch \
10 file://collectd-version.patch \ 10 file://collectd-version.patch \
11 file://glibc-2.20-compatiblity.patch \ 11 file://glibc-2.20-compatiblity.patch \
12 file://collectd.init" 12 file://collectd.init \
13 file://collectd.service"
13SRC_URI[md5sum] = "6f56c71c96573a7f4f7fb3bfab185974" 14SRC_URI[md5sum] = "6f56c71c96573a7f4f7fb3bfab185974"
14SRC_URI[sha256sum] = "75452129f271cb0aad28e57f12a49070618bbb7b6a9d64cf869e8766fa2f66e0" 15SRC_URI[sha256sum] = "75452129f271cb0aad28e57f12a49070618bbb7b6a9d64cf869e8766fa2f66e0"
15 16
16inherit autotools pythonnative update-rc.d pkgconfig 17inherit autotools pythonnative update-rc.d pkgconfig systemd
18
19SYSTEMD_SERVICE_${PN} = "collectd.service"
17 20
18# Floatingpoint layout, architecture dependent 21# Floatingpoint layout, architecture dependent
19# 'nothing', 'endianflip' or 'intswap' 22# 'nothing', 'endianflip' or 'intswap'
@@ -55,6 +58,12 @@ do_install_append() {
55 58
56 rmdir "${D}${localstatedir}/run" 59 rmdir "${D}${localstatedir}/run"
57 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" 60 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
61
62 # Install systemd unit files
63 install -d ${D}${systemd_unitdir}/system
64 install -m 0644 ${WORKDIR}/collectd.service ${D}${systemd_unitdir}/system
65 sed -i -e 's,@SBINDIR@,${sbindir},g' \
66 ${D}${systemd_unitdir}/system/collectd.service
58} 67}
59 68
60INITSCRIPT_NAME = "collectd" 69INITSCRIPT_NAME = "collectd"