This is not very reliable as the exit codes are not very clean, but it
is good enough to tell the user on the terminal whether arpwatch is
running and it will fix the web UI output.
Fixes: #13874 - Arpwatch does not display correct status on service.cgi
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
${0} start
;;
+ status)
+ failed=0
+
+ for intf in ${INTERFACES}; do
+ PIDFILE="/var/run/arpwatch-${intf}.pid" \
+ statusproc /usr/sbin/arpwatch || failed=$?
+ done
+
+ exit ${failed}
+ ;;
+
*)
echo "Usage: ${0} {start|stop|restart}"
exit 1