summaryrefslogtreecommitdiff
path: root/net/arpwatch/files/arpwatch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'net/arpwatch/files/arpwatch.sh')
-rw-r--r--net/arpwatch/files/arpwatch.sh20
1 files changed, 17 insertions, 3 deletions
diff --git a/net/arpwatch/files/arpwatch.sh b/net/arpwatch/files/arpwatch.sh
index ebaf7946aac9..f0c8a797cb54 100644
--- a/net/arpwatch/files/arpwatch.sh
+++ b/net/arpwatch/files/arpwatch.sh
@@ -1,4 +1,18 @@
#!/bin/sh
-if [ -x /usr/local/sbin/arpwatch -a -d /usr/local/arpwatch ]; then
- /usr/local/sbin/arpwatch && echo -n ' arpwatch'
-fi
+
+case $1 in
+start)
+ if [ -x /usr/local/sbin/arpwatch -a -d /usr/local/arpwatch ]; then
+ /usr/local/sbin/arpwatch && echo -n ' arpwatch'
+ fi
+ ;;
+stop)
+ killall arpwatch && echo -n ' arpwatch'
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ exit 64
+ ;;
+esac
+
+exit 0