diff --git a/mail/rspamd/Makefile b/mail/rspamd/Makefile index 9c8dd18dda91..bb36106364a9 100644 --- a/mail/rspamd/Makefile +++ b/mail/rspamd/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.60 2019/12/08 09:32:05 triaxx Exp $ +# $NetBSD: Makefile,v 1.61 2020/01/06 12:06:08 jperkin Exp $ DISTNAME= rspamd-2.2 +PKGREVISION= 1 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_GITHUB:=vstakhov/} @@ -49,6 +50,7 @@ FILES_SUBST+= RSPAMD_USER=${RSPAMD_USER} FILES_SUBST+= RSPAMD_GROUP=${RSPAMD_GROUP} RCD_SCRIPTS= rspamd +SMF_METHODS= rspamd CMAKE_ARGS+= -DMANDIR:PATH=${PREFIX}/${PKGMANDIR} CMAKE_ARGS+= -DLOGDIR:PATH=${LOGDIR} diff --git a/mail/rspamd/files/smf/manifest.xml b/mail/rspamd/files/smf/manifest.xml index 031b5ae9df45..c7b6f669c704 100644 --- a/mail/rspamd/files/smf/manifest.xml +++ b/mail/rspamd/files/smf/manifest.xml @@ -11,7 +11,7 @@ - + diff --git a/mail/rspamd/files/smf/rspamd.sh b/mail/rspamd/files/smf/rspamd.sh new file mode 100644 index 000000000000..d5b746ad8bd5 --- /dev/null +++ b/mail/rspamd/files/smf/rspamd.sh @@ -0,0 +1,14 @@ +#!@SMF_METHOD_SHELL@ +# +# $NetBSD: rspamd.sh,v 1.1 2020/01/06 12:06:08 jperkin Exp $ +# + +. /lib/svc/share/smf_include.sh + +if [ ! -d @VARBASE@/run/rspamd ]; then + @MKDIR@ @VARBASE@/run/rspamd + @CHMOD@ 0750 @VARBASE@/run/rspamd + @CHOWN@ @RSPAMD_USER@:@RSPAMD_GROUP@ @VARBASE@/run/rspamd +fi + +@PREFIX@/bin/rspamd "$@"