head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	2026.08.30.14.31.38;	author leot;	state Exp;
branches;
next	;
commitid	MgQBUsbYU7GXBFTG;


desc
@@


1.1
log
@iocaine: Import iocaine-3.5.1 as www/iocaine

A powerful, programmable defense system that tries to stay out of the way, to
protect backend services and poison crawlers, without interfering with normal
use of the services.

Packaged by Gergely Nagy via <https://git.madhouse-project.org/iocaine/pkgsrc/>,
thanks!
@
text
@#!@@RCD_SCRIPTS_SHELL@@
#
# $NetBSD$
#
# PROVIDE: iocaine
# REQUIRE: NETWORKING DAEMON
# KEYWORD: shutdown

name="iocaine"
command="@@PREFIX@@/sbin/daemonize"
pidfile="@@VARBASE@@/run/${name}/${name}.pid"

task="@@PREFIX@@/bin/${name}"
procname="${task}"

command_args="-p ${pidfile} \
	-u @@IOCAINE_USER@@ \
	-c @@IOCAINE_DATADIR@@ \
	-e @@IOCAINE_LOGDIR@@/stderr \
	-o @@IOCAINE_LOGDIR@@/stdout \
	${task} --config-path @@PKG_SYSCONFDIR@@/conf.d start"

iocaine_precmd()
{
	if [ ! -e "@@VARBASE@@/run/${name}" ]; then
		install -d -o @@IOCAINE_USER@@ -g @@IOCAINE_GROUP@@ \
			@@VARBASE@@/run/${name};
	fi
}

$_rc_subr_loaded . @@SYSCONFBASE@@/rc.subr
start_precmd="iocaine_precmd"

load_rc_config ${name}
run_rc_command "$1"
@
