#!/bin/sh
#
# $FreeBSD: ports/sysutils/msyslog/files/msyslogd.sh.in,v 1.3 2007/04/22 09:22:13 az Exp $
#

# PROVIDE: syslogd
# REQUIRE: mountcritremote cleanvar
# BEFORE:  SERVERS
#
# Add the following lines to /etc/rc.conf to enable msyslogd:
#
# msyslogd_enable="YES"
#
# Yes, here you can pass arguments to daemon
#
# msyslogd_flags=""
#

. /etc/rc.subr

name=msyslogd
rcvar=`set_rcvar`

command=/usr/local/sbin/syslogd
pidfile=/var/run/syslog.pid
required_files=/usr/local/etc/syslog.conf

start_precmd=start_precmd
stop_postcmd=stop_postcmd

extra_commands="reload"

start_precmd()
{
  case $syslogd_enable in
  [Yy][Ee][Ss]|1)
    warn "syslogd_enable should be set to NO"
    ;;
    esac
}

stop_postcmd()
{
  rm -f $pidfile
}

# read settings, set default values
load_rc_config $name
: ${msyslogd_enable="NO"}
: ${msyslogd_flags=""}

run_rc_command "$1"


syntax highlighted by Code2HTML, v. 0.9.1