2018-01-11 19:27:01 +00:00
|
|
|
#!/bin/ksh
|
2012-04-11 18:39:13 +00:00
|
|
|
#
|
2018-01-14 14:42:18 +00:00
|
|
|
# $OpenBSD: netatalk.rc,v 1.9 2018/01/14 14:42:18 rpe Exp $
|
2012-04-11 18:39:13 +00:00
|
|
|
|
2012-07-04 13:00:46 +00:00
|
|
|
# "meta" script running the following rc.d(8) scripts with the given argument;
|
2015-11-29 15:50:20 +00:00
|
|
|
# note that daemon_flags, daemon_user, daemon_timeout and daemon_class are not
|
|
|
|
# passed to the child scripts.
|
2012-04-11 18:39:13 +00:00
|
|
|
_pkg_scripts="cnid_metad afpd"
|
|
|
|
|
2018-01-14 14:42:18 +00:00
|
|
|
if [[ $1 == restart ]]; then
|
2015-02-17 22:08:36 +00:00
|
|
|
$0 stop && $0 start
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2018-01-14 14:42:18 +00:00
|
|
|
if [[ $1 == stop ]]; then
|
2012-08-25 10:14:37 +00:00
|
|
|
for _i in ${_pkg_scripts}; do _l="${_i} ${_l}"; done
|
|
|
|
_pkg_scripts=${_l% }
|
2012-04-11 18:39:13 +00:00
|
|
|
fi
|
2012-08-25 10:14:37 +00:00
|
|
|
|
2015-02-17 22:08:36 +00:00
|
|
|
for _i in ${_pkg_scripts}; do
|
|
|
|
if [[ -x ${RCDIR}/${_i} ]]; then
|
|
|
|
${RCDIR}/${_i} $@ || exit $?
|
|
|
|
fi
|
|
|
|
done
|