From 9ce8c29b90c7d8a5f62fd3dcc8afd48c6aede960 Mon Sep 17 00:00:00 2001 From: Krzysztof Date: Sun, 8 Oct 2023 13:51:42 -1000 Subject: mail/postsrsd: Fix `service postsrsd stop` exit code Also improve integration with the sample configuration file. PR: 274168 Approved by: Krzysztof (maintainer) --- mail/postsrsd/Makefile | 9 +++++++-- mail/postsrsd/files/postsrsd.in | 7 ------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/mail/postsrsd/Makefile b/mail/postsrsd/Makefile index bf7cd417785b..387d4b2245c3 100644 --- a/mail/postsrsd/Makefile +++ b/mail/postsrsd/Makefile @@ -1,6 +1,6 @@ PORTNAME= postsrsd DISTVERSION= 2.0.8 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= mail @@ -34,7 +34,8 @@ SUB_FILES= pkg-message PLIST_FILES= \ sbin/postsrsd \ "@sample ${ETCDIR}.conf.sample" \ - "@dir /var/db/${PORTNAME}" + "@dir /var/db/${PORTNAME}" \ + "@dir /var/run/${PORTNAME}" PORTDOCS= CHANGELOG.rst README.rst postsrsd.conf @@ -50,7 +51,11 @@ SQLITE_DESC= Use sqlite3 backebd for storing envelope senders SQLITE_USES= sqlite SQLITE_CMAKE_BOOL= WITH_SQLITE +post-patch: + ${REINPLACE_CMD} -e '/^chroot-dir/ s/^/#/' ${WRKSRC}/doc/postsrsd.conf + post-install: ${INSTALL_DATA} ${WRKSRC}/doc/postsrsd.conf ${STAGEDIR}${PREFIX}/etc/postsrsd.conf.sample + ${MKDIR} ${STAGEDIR}/var/run/${PORTNAME} .include diff --git a/mail/postsrsd/files/postsrsd.in b/mail/postsrsd/files/postsrsd.in index 1e0617568447..29a89b8bdefa 100644 --- a/mail/postsrsd/files/postsrsd.in +++ b/mail/postsrsd/files/postsrsd.in @@ -22,7 +22,6 @@ name="postsrsd" rcvar=postsrsd_enable start_precmd="postsrsd_prepcmd" -stop_postcmd="postsrsd_postcmd" command="%%PREFIX%%/sbin/postsrsd" _piddir="/var/run/postsrsd" pidfile="${_piddir}/${name}.pid" @@ -56,12 +55,6 @@ postsrsd_prepcmd () fi } -postsrsd_postcmd() -{ - # just if the directory is empty - rmdir ${_piddir} > /dev/null 2>&1 -} - # to let rc.subr kill them all unset pidfile -- cgit v1.2.3