3 test -x /usr/sbin/atalkd || exit 0
5 servername=$(/bin/hostname --short)
7 # Enable PAP (AppleTalk Printer Access Protocol) daemon
13 echo -n "Starting AppleTalk Daemons (this will take a while):"
17 /usr/bin/nbprgstr -p 4 "$servername:Workstation"
18 /usr/bin/nbprgstr -p 4 "$servername:netatalk"
20 /usr/sbin/afpd -n "$servername"
23 if [ "$ENABLE_PAP" = "yes" ]; then
32 echo -n "Stopping AppleTalk Daemons:"
34 start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/afpd
36 if [ -f /var/run/papd.pid ]; then
38 start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/papd
42 start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/atalkd
52 echo -n "Restarting AppleTalk Daemons (this will take a while)"
53 /etc/init.d/netatalk stop > /dev/null 2>&1
57 if /etc/init.d/netatalk start > /dev/null 2>&1
64 echo "Usage: /etc/init.d/netatalk {start|stop|restart|force-reload}" >&2