#!/bin/sh # # $FreeBSD: head/sysutils/msyslog/files/msyslogd.in 340872 2014-01-24 00:14:07Z mat $ # # 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=msyslogd_enable command=%%PREFIX%%/sbin/syslogd pidfile=/var/run/syslog.pid required_files=%%PREFIX%%/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"} run_rc_command "$1"