From: Michael Tremer Date: Mon, 22 Sep 2025 13:08:26 +0000 (+0100) Subject: arpwatch: Add status command to the initscript X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8938a92229729aa0d1c078df2c34c4a125b765a8;p=ipfire-2.x.git 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 --- 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