freebsd-ports/net/netatalk3/files/netatalk.in
Joe Marcus Clarke cc013ca6a4 Allow reloading of the afpd config file via the RC script.
Reported by:	Fusl <root@meo.ws>
2015-10-04 01:23:32 +00:00

41 lines
661 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: netatalk
# REQUIRE: DAEMON %%ZEROCONF%%
# KEYWORD: shutdown
#
# AFP fileserver for Mac clients. Add the following to /etc/rc.conf to
# enable:
#
# netatalk_enable="YES"
#
netatalk_enable=${netatalk_enable-"NO"}
. /etc/rc.subr
name=netatalk
rcvar=netatalk_enable
load_rc_config ${name}
command=%%PREFIX%%/sbin/${name}
extra_commands="reload"
reload_cmd="netatalk_reload"
netatalk_reload()
{
local status
if ! status=`run_rc_command status 2>&1`; then
echo $status
return 1
fi
echo 'Reloading netatalk.'
kill -HUP $rc_pid
}
run_rc_command "$1"