updated on Sun Jan 15 20:01:04 UTC 2012
[aur-mirror.git] / arpd / arpd.rc
blobb0ff27a80decd558cd3372df2b4aff5da7338bf0
1 #! /bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 ARPD_ARGS=
7 [ -f /etc/conf.d/arpd ] && . /etc/conf.d/arpd
9 PID=$(pidof -o %PPID /usr/sbin/arpd)
10 case "$1" in
11 start)
12 stat_busy "Starting ARPd"
13 [ -z "$PID" ] && /usr/sbin/arpd ${ARPD_ARGS} &>/dev/null
14 if [ $? -gt 0 ]; then
15 stat_fail
16 else
17 add_daemon arpd
18 stat_done
21 stop)
22 stat_busy "Stopping ARPd"
23 [ ! -z "$PID" ] && kill $PID &>/dev/null
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 rm_daemon arpd
28 stat_done
31 restart)
32 $0 stop
33 $0 start
36 echo "usage: $0 {start|stop|restart}"
37 esac
38 exit 0