aboutsummaryrefslogtreecommitdiffstats
path: root/main/arpwatch/arpwatch.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/arpwatch/arpwatch.initd')
-rw-r--r--main/arpwatch/arpwatch.initd13
1 files changed, 8 insertions, 5 deletions
diff --git a/main/arpwatch/arpwatch.initd b/main/arpwatch/arpwatch.initd
index b97c25a9c8..069d9b93f7 100644
--- a/main/arpwatch/arpwatch.initd
+++ b/main/arpwatch/arpwatch.initd
@@ -9,6 +9,9 @@ depend() {
}
start() {
+ checkpath -d -o ${ARPUSER}\
+ -m 0755 /var/run/arpwatch
+
for IFACE in ${IFACES}
do
ebegin "Starting arpwatch on ${IFACE}"
@@ -16,12 +19,12 @@ start() {
[ ! -f ${DATAFILE} ] && touch ${DATAFILE}
if [ -z ${ARPUSER} ]; then
- start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \
- /usr/sbin/arpwatch -- -i ${IFACE} -f ${DATAFILE} -P /var/run/arpwatch.${IFACE}.pid ${OPTIONS}
+ start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch/arpwatch.${IFACE}.pid --exec \
+ /usr/sbin/arpwatch -- -i ${IFACE} -f ${DATAFILE} -P /var/run/arpwatch/arpwatch.${IFACE}.pid ${OPTIONS}
else
chown ${ARPUSER} ${DATAFILE}
- start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \
- /usr/sbin/arpwatch -- -i $IFACE -u ${ARPUSER} -f ${DATAFILE} -P /var/run/arpwatch.${IFACE}.pid ${OPTIONS}
+ start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch/arpwatch.${IFACE}.pid --exec \
+ /usr/sbin/arpwatch -- -i $IFACE -u ${ARPUSER} -f ${DATAFILE} -P /var/run/arpwatch/arpwatch.${IFACE}.pid ${OPTIONS}
fi
eend $?
done
@@ -31,7 +34,7 @@ stop() {
for IFACE in ${IFACES}
do
ebegin "Stopping arpwatch on ${IFACE}"
- start-stop-daemon --stop --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \
+ start-stop-daemon --stop --quiet --pidfile=/var/run/arpwatch/arpwatch.${IFACE}.pid --exec \
/usr/sbin/arpwatch
eend $?
done