pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mail/rspamd



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Mon Jan  6 12:06:09 UTC 2020

Modified Files:
        pkgsrc/mail/rspamd: Makefile
        pkgsrc/mail/rspamd/files/smf: manifest.xml
Added Files:
        pkgsrc/mail/rspamd/files/smf: rspamd.sh

Log Message:
rspamd: Create rundir via SMF method script.

Fixes first run after reboot.  Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 pkgsrc/mail/rspamd/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/mail/rspamd/files/smf/manifest.xml
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/rspamd/files/smf/rspamd.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mail/rspamd/Makefile
diff -u pkgsrc/mail/rspamd/Makefile:1.60 pkgsrc/mail/rspamd/Makefile:1.61
--- pkgsrc/mail/rspamd/Makefile:1.60    Sun Dec  8 09:32:05 2019
+++ pkgsrc/mail/rspamd/Makefile Mon Jan  6 12:06:08 2020
@@ -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}

Index: pkgsrc/mail/rspamd/files/smf/manifest.xml
diff -u pkgsrc/mail/rspamd/files/smf/manifest.xml:1.4 pkgsrc/mail/rspamd/files/smf/manifest.xml:1.5
--- pkgsrc/mail/rspamd/files/smf/manifest.xml:1.4       Thu Feb  1 09:07:23 2018
+++ pkgsrc/mail/rspamd/files/smf/manifest.xml   Mon Jan  6 12:06:08 2020
@@ -11,7 +11,7 @@
       <service_fmri value="svc:/system/filesystem/local" />
     </dependency>
     <method_context></method_context>
-    <exec_method type="method" name="start" exec="@PREFIX@/bin/rspamd -u @RSPAMD_USER@ -g @RSPAMD_USER@ -c %{config_file}" timeout_seconds="60" />
+    <exec_method type="method" name="start" exec="@PREFIX@/@SMF_METHOD_FILE.rspamd@ -u @RSPAMD_USER@ -g @RSPAMD_USER@ -c %{config_file}" timeout_seconds="60" />
     <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
     <property_group name="startd" type="framework">
       <propval name="duration" type="astring" value="contract" />

Added files:

Index: pkgsrc/mail/rspamd/files/smf/rspamd.sh
diff -u /dev/null pkgsrc/mail/rspamd/files/smf/rspamd.sh:1.1
--- /dev/null   Mon Jan  6 12:06:09 2020
+++ pkgsrc/mail/rspamd/files/smf/rspamd.sh      Mon Jan  6 12:06:08 2020
@@ -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 "$@"



Home | Main Index | Thread Index | Old Index