--- sguil-sensor-0.9.0.ebuild 2016-06-13 04:42:07.700648053 +0200 +++ sguil-sensor-0.9.0-r1.ebuild 2016-06-13 04:42:07.703981347 +0200 @@ -4,7 +4,7 @@ EAPI=5 -inherit user +inherit user systemd MY_PV="${PV/_p/p}" DESCRIPTION="Sensor part of sguil Network Security Monitoring" @@ -77,6 +77,7 @@ dobin sensor/pcap_agent-sancp.tcl dobin sensor/sancp_agent.tcl dobin sensor/snort_agent.tcl + newbin "${FILESDIR}/systemd-log_packets_rotate.sh" log_packets_rotate newinitd "${FILESDIR}/log_packets.initd" log_packets newinitd "${FILESDIR}/pads_agent.initd" pads_agent @@ -85,6 +86,14 @@ newinitd "${FILESDIR}/sancp_agent.initd" sancp_agent newinitd "${FILESDIR}/snort_agent.initd" snort_agent newconfd "${FILESDIR}/log_packets.confd" log_packets + systemd_dounit "${FILESDIR}/pads_agent.service" + systemd_dounit "${FILESDIR}/pcap_agent.service" + systemd_dounit "${FILESDIR}/pcap_agent-sancp.service" + systemd_dounit "${FILESDIR}/sancp_agent.service" + systemd_dounit "${FILESDIR}/snort_agent.service" + systemd_dounit "${FILESDIR}/log_packets_rotate.timer" + systemd_dounit "${FILESDIR}/log_packets_rotate.service" + systemd_newunit "${FILESDIR}/log_packets_at.service" log_packets\@.service insinto /etc/sguil doins sensor/pads_agent.conf @@ -116,4 +125,11 @@ elog "You should crontab the /etc/init.d/log_packets script to restart" elog "each hour." elog + elog "If you are using systemd, the log_packets@.service unit will" + elog "automatically start the log_packets_rotate.timer unit which" + elog "will take care of that. Just enable this unit with the device" + elog "name you are monitoring, for example: log_packets@eth0.service." + elog "As well as all the agents like snort_agent.service," + elog "pcap_agent.service etc. you need." + elog }