Create a subdirectory of /var/run that is writeable by the bopm user and

put the pidfile there.

Tested by:	Michael D <me@md-5.net>
This commit is contained in:
Tijl Coosemans 2014-11-22 20:04:49 +00:00
parent 07693387f9
commit 5b6c7671ef
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=373099
3 changed files with 10 additions and 10 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= bopm
PORTVERSION= 3.1.3
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= irc
MASTER_SITES= http://static.blitzed.org/www.blitzed.org/bopm/files/ \
ftp://rusunix.org/pub/FreeBSD/distfiles/
@ -11,17 +11,13 @@ MASTER_SITES= http://static.blitzed.org/www.blitzed.org/bopm/files/ \
MAINTAINER= ports@FreeBSD.org
COMMENT= Open proxy and DNSBL monitor designed for use with ircds
LOGDIR= /var/log/${PORTNAME}
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --localstatedir=${LOGDIR}
CONFIGURE_ARGS= --localstatedir=/var/log/bopm
INSTALL_TARGET= install-strip
USES= libtool
USE_LDCONFIG= yes
USE_RC_SUBR= bopm
PLIST_SUB= LOGDIR=${LOGDIR}
USERS= bopm
GROUPS= bopm
@ -29,8 +25,11 @@ MAKE_JOBS_UNSAFE= yes
post-patch:
@${REINPLACE_CMD} \
-e 's,/some/path/bopm.pid,/var/run/bopm.pid,g' \
-e 's,/some/path/scan.log,${LOGDIR}/scan.log,g' \
-e 's,/some/path/bopm.pid,/var/run/bopm/bopm.pid,g' \
-e 's,/some/path/scan.log,/var/log/bopm/scan.log,g' \
${WRKSRC}/bopm.conf.sample
post-stage:
@${MKDIR} ${STAGEDIR}/var/run/bopm
.include <bsd.port.mk>

View File

@ -24,7 +24,7 @@ load_rc_config $name
: ${bopm_config="%%PREFIX%%/etc/bopm.conf"}
bopm_user="bopm"
pidfile="/var/run/bopm.pid"
pidfile="/var/run/bopm/bopm.pid"
required_files="${bopm_config}"
# NOTE: bopm behaves differently with or without the -d flag.

View File

@ -9,4 +9,5 @@ lib/libopm.a
lib/libopm.so
lib/libopm.so.0
lib/libopm.so.0.0.0
@dir(bopm,bopm,750) %%LOGDIR%%
@dir(bopm,bopm,750) /var/log/bopm
@dir(bopm,bopm,750) /var/run/bopm