diff options
Diffstat (limited to 'net/netatalk4/files/netatalk.in')
-rw-r--r-- | net/netatalk4/files/netatalk.in | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/net/netatalk4/files/netatalk.in b/net/netatalk4/files/netatalk.in new file mode 100644 index 000000000000..36a36747f34d --- /dev/null +++ b/net/netatalk4/files/netatalk.in @@ -0,0 +1,39 @@ +#!/bin/sh + +# 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" |