From 8938a92229729aa0d1c078df2c34c4a125b765a8 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 22 Sep 2025 14:08:26 +0100 Subject: [PATCH] arpwatch: Add status command to the initscript 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 --- src/initscripts/packages/arpwatch | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/initscripts/packages/arpwatch b/src/initscripts/packages/arpwatch index 09dcdf1ba..316cf3e71 100644 --- a/src/initscripts/packages/arpwatch +++ b/src/initscripts/packages/arpwatch @@ -74,6 +74,17 @@ case "${1}" in ${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 -- 2.47.3