Skip to content

Commit

Permalink
mail/postsrsd: Fix service postsrsd stop exit code
Browse files Browse the repository at this point in the history
Also improve integration with the sample configuration file.

PR:		274168
Approved by:	Krzysztof <ports@bsdserwis.com> (maintainer)
  • Loading branch information
Krzysztof authored and smortex committed Oct 8, 2023
1 parent afb0858 commit 9ce8c29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 7 additions & 2 deletions mail/postsrsd/Makefile
@@ -1,6 +1,6 @@
PORTNAME= postsrsd
DISTVERSION= 2.0.8
PORTREVISION= 1
PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= mail

Expand Down Expand Up @@ -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

Expand All @@ -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>
7 changes: 0 additions & 7 deletions mail/postsrsd/files/postsrsd.in
Expand Up @@ -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"
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 9ce8c29

Please sign in to comment.