diff options
Diffstat (limited to 'net-analyzer/arpwatch/files/arpwatch.initd-r1')
-rw-r--r-- | net-analyzer/arpwatch/files/arpwatch.initd-r1 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/net-analyzer/arpwatch/files/arpwatch.initd-r1 b/net-analyzer/arpwatch/files/arpwatch.initd-r1 new file mode 100644 index 000000000000..ffe165205c6a --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.initd-r1 @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Default to "lo" for the interface, so that the init script will work +# out-of-the-box. +: ${ARPWATCH_IFACE:=lo} + +ARPWATCH_DATAFILE="/var/lib/arpwatch/${RC_SVCNAME}.dat" + +command="/usr/sbin/arpwatch" +pidfile="/run/${RC_SVCNAME}.pid" +command_args="-i ${ARPWATCH_IFACE} + -u arpwatch + -f ${ARPWATCH_DATAFILE} + -P ${pidfile} + ${ARPWATCH_OPTS}" + +depend() { + need "net.${ARPWATCH_IFACE}" +} + +start_pre() { + # The "arpwatch" user must be a member of the "arpwatch" group for + # this to work. + checkpath --file --owner root:arpwatch --mode 0660 "${ARPWATCH_DATAFILE}" +} |