#!/bin/sh
#
# $FreeBSD: ports/sysutils/3dm/files/3dm2.sh.in,v 1.4 2010/07/01 11:47:55 sylvio Exp $
#

# PROVIDE: 3dm2
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable 3dm2:
# twdm2_enable="YES"
#

. /etc/rc.subr

name=twdm2
rcvar=`set_rcvar`

start_precmd=twdm2_precmd
command="/usr/local/sbin/3dm2"
required_files=/usr/local/etc/3dm2/3dm2.conf
sig_stop=INT

twdm2_precmd()
{
	umask 077
}

# set default
twdm2_enable=${twdm2_enable:-"NO"}

load_rc_config $name
run_rc_command "$1"
