diff options
author | Sam James <sam@gentoo.org> | 2021-03-15 20:19:46 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-03-15 20:19:46 +0000 |
commit | 8245121a7b25edc276225f09c134fe85da61b089 (patch) | |
tree | af4893c5d1bd8f0b68b49ea55356063191d1f99d /net-analyzer/arpwatch | |
parent | net-analyzer/amap: port to EAPI 7 (diff) | |
download | gentoo-8245121a7b25edc276225f09c134fe85da61b089.tar.gz gentoo-8245121a7b25edc276225f09c134fe85da61b089.tar.bz2 gentoo-8245121a7b25edc276225f09c134fe85da61b089.zip |
net-analyzer/arpwatch: install systemd unit
Thanks-to: Ryan James <rinkydinksrj@gmail.com>
Closes: https://bugs.gentoo.org/648572
Package-Manager: Portage-3.0.14-prefix, Repoman-3.0.2
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer/arpwatch')
-rw-r--r-- | net-analyzer/arpwatch/arpwatch-3.1-r1.ebuild (renamed from net-analyzer/arpwatch/arpwatch-3.1.ebuild) | 8 | ||||
-rw-r--r-- | net-analyzer/arpwatch/files/arpwatch.conf | 16 | ||||
-rw-r--r-- | net-analyzer/arpwatch/files/arpwatch.service | 16 |
3 files changed, 38 insertions, 2 deletions
diff --git a/net-analyzer/arpwatch/arpwatch-3.1.ebuild b/net-analyzer/arpwatch/arpwatch-3.1-r1.ebuild index 64ae0f6ef45b..bca29a3a678b 100644 --- a/net-analyzer/arpwatch/arpwatch-3.1.ebuild +++ b/net-analyzer/arpwatch/arpwatch-3.1-r1.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit user + +inherit systemd user DESCRIPTION="An ethernet monitor program that keeps track of ethernet/IP address pairings" HOMEPAGE="https://ee.lbl.gov/" @@ -60,6 +61,9 @@ src_install() { newconfd "${FILESDIR}"/arpwatch.confd-r2 arpwatch newinitd "${FILESDIR}"/arpwatch.initd-r2 arpwatch + + systemd_dounit "${FILESDIR}/arpwatch.service" + systemd_install_serviced "${FILESDIR}/arpwatch.conf" } pkg_postinst() { diff --git a/net-analyzer/arpwatch/files/arpwatch.conf b/net-analyzer/arpwatch/files/arpwatch.conf new file mode 100644 index 000000000000..070f0edad80b --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.conf @@ -0,0 +1,16 @@ +# Config file for /etc/systemd/system/arpwatch +# see arpwatch.8 for more information + +IFACES=-i eno1 + +# Location of the PID file +PIDFILE=-P /run/arpwatch.pid + +# Additional options to pass to arpwatch. +OPTIONS=-N -p -Q -D + +# Where to store the data (default is /usr/share/arpwatch) +DATA=-f /var/log/arpwatch/eno1.dat + +# Comment this line if you wish arpwatch to run as root user (not recommended) +RUNUSER=-u arpwatch diff --git a/net-analyzer/arpwatch/files/arpwatch.service b/net-analyzer/arpwatch/files/arpwatch.service new file mode 100644 index 000000000000..943e3146f8df --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.service @@ -0,0 +1,16 @@ +[Unit] +Description=Ethernet monitoring program that tracks net/IP pairings +Documentation=man:arpwatch(8) +Conflicts= +After=systemd-networkd.service + +PIDFILE=/run/arpwatch.pid + +[Service] +Type=forking +ExecStartPre=/bin/rm -f /run/arpwatch.pid +ExecStart=/usr/sbin/arpwatch $IFACES $PIDFILE $RUNUSER $OPTIONS $DATA +Restart=on-abort + +[Install] +Alias=arpwatchd.service |