diff options
author | Chong.Lu@windriver.com <Chong.Lu@windriver.com> | 2014-09-18 09:23:59 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-09-26 05:41:53 +0200 |
commit | f25843b7fa9acdfac980a581118190ca6bb7fbf3 (patch) | |
tree | 99ce97fbf7abf224b9df0aefe31936bb1bc8d0e9 /meta-oe/recipes-extended/collectd | |
parent | a689cb8239360ba0c8b3e7934fe49fd8dfe449e8 (diff) | |
download | meta-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.service | 12 | ||||
-rw-r--r-- | meta-oe/recipes-extended/collectd/collectd_5.4.1.bb | 13 |
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] | ||
2 | Description=Collectd | ||
3 | After=local-fs.target network.target | ||
4 | Requires=local-fs.target network.target | ||
5 | |||
6 | [Service] | ||
7 | ExecStart=@SBINDIR@/collectd -C /etc/collectd.conf -f | ||
8 | Restart=always | ||
9 | RestartSec=10 | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=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" | ||
13 | SRC_URI[md5sum] = "6f56c71c96573a7f4f7fb3bfab185974" | 14 | SRC_URI[md5sum] = "6f56c71c96573a7f4f7fb3bfab185974" |
14 | SRC_URI[sha256sum] = "75452129f271cb0aad28e57f12a49070618bbb7b6a9d64cf869e8766fa2f66e0" | 15 | SRC_URI[sha256sum] = "75452129f271cb0aad28e57f12a49070618bbb7b6a9d64cf869e8766fa2f66e0" |
15 | 16 | ||
16 | inherit autotools pythonnative update-rc.d pkgconfig | 17 | inherit autotools pythonnative update-rc.d pkgconfig systemd |
18 | |||
19 | SYSTEMD_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 | ||
60 | INITSCRIPT_NAME = "collectd" | 69 | INITSCRIPT_NAME = "collectd" |