Initialize port
This commit is contained in:
		
							
								
								
									
										24
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,24 @@
 | 
			
		||||
# sysutils/godit/Makefile 2023-12-18 08:18:42Z yo
 | 
			
		||||
 | 
			
		||||
PORTNAME=	godit
 | 
			
		||||
PORTVERSION=	0.6.2
 | 
			
		||||
DISTVERSIONPREFIX=v
 | 
			
		||||
PORTREVISION=	1
 | 
			
		||||
CATEGORIES=	sysutils
 | 
			
		||||
 | 
			
		||||
MAINTAINER=	johan@nosd.in
 | 
			
		||||
COMMENT=	Read audit trails and decode to human readable (text/json). Service reads auditpipe and write to text file.
 | 
			
		||||
WWW=            https://git.nosd.in/yo/libbsm/
 | 
			
		||||
 | 
			
		||||
LICENSE=	BSD3CLAUSE
 | 
			
		||||
 | 
			
		||||
USES=		go:modules
 | 
			
		||||
GO_MODULE=      git.nosd.in/yo/libbsm
 | 
			
		||||
 | 
			
		||||
USE_RC_SUBR=    godit
 | 
			
		||||
 | 
			
		||||
post-install:
 | 
			
		||||
		@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 | 
			
		||||
		${INSTALL_DATA} ${PATCHDIR}/godit.newsyslog ${STAGEDIR}${EXAMPLESDIR}/newsyslog.sample
 | 
			
		||||
 | 
			
		||||
.include <bsd.port.mk>
 | 
			
		||||
							
								
								
									
										5
									
								
								distinfo
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								distinfo
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,5 @@
 | 
			
		||||
TIMESTAMP = 1702901853
 | 
			
		||||
SHA256 (go/sysutils_godit/godit-v0.6.2/v0.6.2.mod) = ca43bc984123603d2c01378b2a26e279d9e05bc60202886019c9cc3d4054729e
 | 
			
		||||
SIZE (go/sysutils_godit/godit-v0.6.2/v0.6.2.mod) = 61
 | 
			
		||||
SHA256 (go/sysutils_godit/godit-v0.6.2/v0.6.2.zip) = e3ca0d3c503312ed781a6c5eaa0e68d81175c0be7be02aca54e23c79b8f6612b
 | 
			
		||||
SIZE (go/sysutils_godit/godit-v0.6.2/v0.6.2.zip) = 24720
 | 
			
		||||
							
								
								
									
										38
									
								
								files/godit.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								files/godit.in
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										7
									
								
								files/godit.newsyslog
									
									
									
									
									
										Normal 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
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3
									
								
								pkg-descr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								pkg-descr
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
			
		||||
Read audit trails and decode to human readable (text/json). Service reads auditpipe and write to text file.
 | 
			
		||||
 | 
			
		||||
WWW: https://git.nosd.in/yo/libbsm/
 | 
			
		||||
		Reference in New Issue
	
	Block a user