#!/bin/sh # PROVIDE: godit # REQUIRE: audit # KEYWORD: shutdown # # Add the following to /etc/rc.conf[.local] to enable this service # godit_enable="YES" # . /etc/rc.subr : ${godit_enable=NO} : ${godit_extra_args=""} name="godit" rcvar="godit_enable" pidfile=/var/run/godit.daemon.pid childpidfile=/var/run/godit.pid godit_current_file="/var/audit/current.godit" load_rc_config ${name} start_precmd="${name}_prestart" command="/usr/sbin/daemon" godit_command="%%PREFIX%%/bin/godit" command_args="-rP ${pidfile} -p ${childpidfile} -S -R 1 -T ${name} \ ${godit_command} -l ${godit_extra_args} -o ${godit_current_file} /dev/auditpipe" extra_commands="reload" godit_prestart() { install -d -m 0750 `dirname "${godit_current_file}"` } run_rc_command "$1"