#! /bin/sh
#
# Start/stop the Netatalk daemons.
#
# Netatalk daemons.
# If you use AppleTalk, Make sure not to start atalkd in the background:
# its data structures must have time to stablize before running the
# other processes.
#
if [ -x /usr/sbin/papd ]; then
killproc papd; echo -n ' papd'
fi
if [ -x /usr/sbin/afpd ]; then
killproc afpd; echo -n ' afpd'
fi
if [ -x /usr/sbin/cnid_metad ]; then
killproc cnid_met; echo -n ' cnid_metad'
fi
if [ -x /usr/sbin/timelord ]; then
killproc timelord; echo -n ' timelord'
fi
# kill atalkd last, since without it the plumbing goes away.
if [ -x /usr/sbin/atalkd ]; then
killproc atalkd; echo -n ' atalkd'
fi
echo '.'
}
case "$1" in
'start')
if [ x"${ATALK_BGROUND}" = x"yes" ]; then
echo -n "Starting netatalk in the background ... "
atalk_startup > /dev/null &
else
atalk_startup
fi
;;
#
# Stop the netatalk server processes.
#
'stop')
echo -n 'stopping netatalk daemons:'
if [ -x /usr/sbin/papd ]; then
killproc papd; echo -n ' papd'
fi
if [ -x /usr/sbin/afpd ]; then
killproc afpd; echo -n ' afpd'
fi
if [ -x /usr/sbin/cnid_metad ]; then
killproc cnid_met; echo -n ' cnid_metad'
fi
if [ -x /usr/sbin/timelord ]; then
killproc timelord; echo -n ' timelord'
fi
# kill atalkd last, since without it the plumbing goes away.
if [ -x /usr/sbin/atalkd ]; then
killproc atalkd; echo -n ' atalkd'
fi