aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof <ports@bsdserwis.com>2023-10-08 23:51:42 +0000
committerRomain Tartière <romain@FreeBSD.org>2023-10-08 23:51:42 +0000
commit9ce8c29b90c7d8a5f62fd3dcc8afd48c6aede960 (patch)
tree54c4e21243746ba7ea4f97ce7cdbcf54422a0915
parentafb085830258e348f7950a90b94ec368de57e84a (diff)
downloadports-9ce8c29b90c7d8a5f62fd3dcc8afd48c6aede960.tar.gz
ports-9ce8c29b90c7d8a5f62fd3dcc8afd48c6aede960.zip
mail/postsrsd: Fix `service postsrsd stop` exit code
Also improve integration with the sample configuration file. PR: 274168 Approved by: Krzysztof <ports@bsdserwis.com> (maintainer)
-rw-r--r--mail/postsrsd/Makefile9
-rw-r--r--mail/postsrsd/files/postsrsd.in7
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 <bsd.port.mk>
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