aboutsummaryrefslogtreecommitdiffstats
path: root/main/arpwatch/arpwatch.initd
diff options
context:
space:
mode:
authorFrancesco Colista <francesco.colista@gmail.com>2013-07-18 07:13:55 +0000
committerFrancesco Colista <francesco.colista@gmail.com>2013-07-18 07:13:55 +0000
commitc01e5a5a1f38dd8812e7b54ffb9d374cd8e8bc28 (patch)
tree0c168d3d95d8e9bcec753c89b7179fa5787d9305 /main/arpwatch/arpwatch.initd
parent093a801bc14b67ecf36b9237cf55b6b47588dbcd (diff)
downloadaports-c01e5a5a1f38dd8812e7b54ffb9d374cd8e8bc28.tar.bz2
aports-c01e5a5a1f38dd8812e7b54ffb9d374cd8e8bc28.tar.xz
main/arpwatch:
- fixed typo of pkguser in pkgusers - changed arpuser to arpwatch - fixed /var/run dir creation and changepath
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