Initialize port

This commit is contained in:
yo
2023-12-18 14:06:09 +01:00
commit 8b6ab026dd
6 changed files with 79 additions and 0 deletions

38
files/godit.in Normal file
View File

@ -0,0 +1,38 @@
#!/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"

7
files/godit.newsyslog Normal file
View File

@ -0,0 +1,7 @@
# configuration file for newsyslog for net-snmp
#
# see newsyslog.conf(5) for details
#
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
/var/audit/current.godit 640 1 * @T00 R /var/run/godit.pid SIGUSR1