#!/bin/sh
#
# $FreeBSD: ports/net/rsync/files/rsyncd.sh.in,v 1.3 2009/07/15 16:55:54 dougb Exp $
#

# PROVIDE: rsyncd
# REQUIRE: LOGIN
# BEFORE:  securelevel
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable `rsyncd':
#
# rsyncd_enable="YES"
# rsyncd_flags="<set as needed>"
#
# See rsync(1) for rsyncd_flags
#

. /etc/rc.subr

name="rsyncd"
rcvar=`set_rcvar`

command="/usr/local/bin/rsync"
command_args="--daemon"
pidfile="/var/run/$name.pid"
required_files="/usr/local/etc/$name.conf"

# read configuration and set defaults
load_rc_config "$name"
: ${rsyncd_enable="NO"}

run_rc_command "$1"
