updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / netatalk-git / atalkd
blobc662b545ca43139b0e77f2179b488253641ef822
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 myhostname=`hostname|sed 's/\..*$//'`
8 PID=`pidof -o %PPID /usr/sbin/atalkd`
9 case "$1" in
10 start)
11 stat_busy "Starting atalkd Daemon"
12 [ -z "$PID" ] && /usr/sbin/atalkd
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 echo $PID > /var/run/atalkd.pid
18 # Setting AppleTalk info with nbprgstr
19 add_daemon atalkd
20 stat_done
23 stop)
24 stat_busy "Stopping atalkd Daemon"
25 [ ! -z "$PID" ] && kill $PID &> /dev/null
26 if [ $? -gt 0 ]; then
27 stat_fail
28 else
29 rm /var/run/atalkd.pid
30 rm_daemon atalkd
31 stat_done
34 restart)
35 $0 stop
36 sleep 1
37 $0 start
40 echo "usage: $0 {start|stop|restart}"
41 esac
42 exit 0