summaryrefslogtreecommitdiffstats
path: root/recipes-ids/suricata/suricata_4.1.5.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-ids/suricata/suricata_4.1.5.bb')
-rw-r--r--recipes-ids/suricata/suricata_4.1.5.bb28
1 files changed, 18 insertions, 10 deletions
diff --git a/recipes-ids/suricata/suricata_4.1.5.bb b/recipes-ids/suricata/suricata_4.1.5.bb
index e15a9a3..b2700d6 100644
--- a/recipes-ids/suricata/suricata_4.1.5.bb
+++ b/recipes-ids/suricata/suricata_4.1.5.bb
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=c70d8d3310941dcdfcd
6 6
7SRC_URI += " \ 7SRC_URI += " \
8 file://volatiles.03_suricata \ 8 file://volatiles.03_suricata \
9 file://tmpfiles.suricata \
9 file://suricata.yaml \ 10 file://suricata.yaml \
10 file://suricata.service \ 11 file://suricata.service \
11 file://run-ptest \ 12 file://run-ptest \
@@ -59,14 +60,19 @@ do_install_append () {
59 60
60 install -m 0644 ${S}/threshold.config ${D}${sysconfdir}/suricata 61 install -m 0644 ${S}/threshold.config ${D}${sysconfdir}/suricata
61 62
62 install -d ${D}${systemd_unitdir}/system 63 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
63 sed -e s:/etc:${sysconfdir}:g \ 64 install -d ${D}${sysconfdir}/tmpfiles.d
64 -e s:/var/run:/run:g \ 65 install -m 0644 ${WORKDIR}/tmpfiles.suricata ${D}${sysconfdir}/tmpfiles.d/suricata.conf
65 -e s:/var:${localstatedir}:g \ 66
66 -e s:/usr/bin:${bindir}:g \ 67 install -d ${D}${systemd_unitdir}/system
67 -e s:/bin/kill:${base_bindir}/kill:g \ 68 sed -e s:/etc:${sysconfdir}:g \
68 -e s:/usr/lib:${libdir}:g \ 69 -e s:/var/run:/run:g \
69 ${WORKDIR}/suricata.service > ${D}${systemd_unitdir}/system/suricata.service 70 -e s:/var:${localstatedir}:g \
71 -e s:/usr/bin:${bindir}:g \
72 -e s:/bin/kill:${base_bindir}/kill:g \
73 -e s:/usr/lib:${libdir}:g \
74 ${WORKDIR}/suricata.service > ${D}${systemd_unitdir}/system/suricata.service
75 fi
70 76
71 # Remove /var/run as it is created on startup 77 # Remove /var/run as it is created on startup
72 rm -rf ${D}${localstatedir}/run 78 rm -rf ${D}${localstatedir}/run
@@ -74,7 +80,9 @@ do_install_append () {
74} 80}
75 81
76pkg_postinst_ontarget_${PN} () { 82pkg_postinst_ontarget_${PN} () {
77if [ -e /etc/init.d/populate-volatile.sh ] ; then 83if command -v systemd-tmpfiles >/dev/null; then
84 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/suricata.conf
85elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
78 ${sysconfdir}/init.d/populate-volatile.sh update 86 ${sysconfdir}/init.d/populate-volatile.sh update
79fi 87fi
80} 88}
@@ -82,7 +90,7 @@ fi
82SYSTEMD_PACKAGES = "${PN}" 90SYSTEMD_PACKAGES = "${PN}"
83 91
84PACKAGES =+ "${PN}-socketcontrol" 92PACKAGES =+ "${PN}-socketcontrol"
85FILES_${PN} += "${systemd_unitdir}" 93FILES_${PN} += "${systemd_unitdir} ${sysconfdir}/tmpfiles.d"
86FILES_${PN}-socketcontrol = "${bindir}/suricatasc ${PYTHON_SITEPACKAGES_DIR}" 94FILES_${PN}-socketcontrol = "${bindir}/suricatasc ${PYTHON_SITEPACKAGES_DIR}"
87 95
88CONFFILES_${PN} = "${sysconfdir}/suricata/suricata.yaml" 96CONFFILES_${PN} = "${sysconfdir}/suricata/suricata.yaml"