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)
This commit is contained in:
Krzysztof 2023-10-08 13:51:42 -10:00 committed by Romain Tartière
parent afb0858302
commit 9ce8c29b90
No known key found for this signature in database
GPG Key ID: BA4D1D955112336F
2 changed files with 7 additions and 9 deletions

View File

@ -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>

View File

@ -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