pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/postgrey Avoid an error about pidfile removal on ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/422f28213b51
branches: trunk
changeset: 339163:422f28213b51
user: kim <kim%pkgsrc.org@localhost>
date: Sat Sep 07 17:13:56 2019 +0000
description:
Avoid an error about pidfile removal on service stop
diffstat:
mail/postgrey/Makefile | 6 +++---
mail/postgrey/files/postgrey.sh | 15 ++++++++++++---
2 files changed, 15 insertions(+), 6 deletions(-)
diffs (56 lines):
diff -r 6034ba5d19dc -r 422f28213b51 mail/postgrey/Makefile
--- a/mail/postgrey/Makefile Sat Sep 07 16:27:32 2019 +0000
+++ b/mail/postgrey/Makefile Sat Sep 07 17:13:56 2019 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.50 2019/09/06 09:58:25 jperkin Exp $
+# $NetBSD: Makefile,v 1.51 2019/09/07 17:13:56 kim Exp $
DISTNAME= postgrey-1.36
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= mail
MASTER_SITES= http://postgrey.schweikert.ch/pub/
-MAINTAINER= kim%tac.nyc.ny.us@localhost
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://postgrey.schweikert.ch/
COMMENT= Postfix Greylist Policy Server
LICENSE= gnu-gpl-v2
diff -r 6034ba5d19dc -r 422f28213b51 mail/postgrey/files/postgrey.sh
--- a/mail/postgrey/files/postgrey.sh Sat Sep 07 16:27:32 2019 +0000
+++ b/mail/postgrey/files/postgrey.sh Sat Sep 07 17:13:56 2019 +0000
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: postgrey.sh,v 1.2 2011/02/16 19:37:50 shattered Exp $
+# $NetBSD: postgrey.sh,v 1.3 2019/09/07 17:13:56 kim Exp $
#
# PROVIDE: postgrey
@@ -11,7 +11,7 @@
name="@PKGBASE@"
rcvar=$name
-pidfile="@VARBASE@/run/${name}.pid"
+pidfile="@VARBASE@/run/${name}/${name}.pid"
command_interpreter="@PERL@"
command="@PREFIX@/sbin/postgrey"
command_args="-d --pidfile=${pidfile}"
@@ -21,7 +21,16 @@
"
@PKGBASE@_flags=${@PKGBASE@_flags-"-i 2525"}
extra_commands="reload"
-stop_postcmd='rm -f $pidfile'
+start_precmd="postgrey_precmd"
+
+postgrey_precmd()
+{
+ if [ ! -d "@VARBASE@/run/${name}" ]; then
+ @MKDIR@ "@VARBASE@/run/${name}"
+ @CHMOD@ 775 "@VARBASE@/run/${name}"
+ @CHOWN@ @POSTGREY_USER@:@POSTGREY_GROUP@ "@VARBASE@/run/${name}"
+ fi
+}
load_rc_config $name
run_rc_command "$1"
Home |
Main Index |
Thread Index |
Old Index