Index: head/net-mgmt/py-pdagent/Makefile =================================================================== --- head/net-mgmt/py-pdagent/Makefile (revision 466568) +++ head/net-mgmt/py-pdagent/Makefile (revision 466569) @@ -1,40 +1,44 @@ # Created by: Mark Felder # $FreeBSD$ PORTNAME= pdagent PORTVERSION= 1.4 DISTVERSIONPREFIX=v +PORTREVISION= 1 CATEGORIES= net-mgmt python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= feld@FreeBSD.org COMMENT= PagerDuty Agent software LICENSE= BSD3CLAUSE USES= python:2.7 shebangfix SHEBANG_FILES= bin/* NO_ARCH= yes NO_BUILD= yes USE_RC_SUBR= pdagentd USE_GITHUB= YES GH_ACCOUNT= PagerDuty SUB_LIST+= PYTHON_CMD="${PYTHON_CMD}" BINFILES= pd-queue pd-send pdagentd.py + +USERS= pdagent +GROUPS= pdagent do-patch: ${REINPLACE_CMD} -e 's|/var/lib/pdagent|/var/db/pdagent|' -e 's|/etc|${ETCDIR}|' ${WRKSRC}/pdagent/confdirs.py do-install: ${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} ${STAGEDIR}/${ETCDIR} (cd ${WRKSRC} && ${COPYTREE_SHARE} pdagent ${STAGEDIR}${PYTHON_SITELIBDIR}) .for i in ${BINFILES} ${INSTALL_SCRIPT} ${WRKSRC}/bin/${i} ${STAGEDIR}/${PREFIX}/bin/${i} .endfor ${INSTALL_DATA} ${WRKSRC}/conf/pdagent.conf ${STAGEDIR}/${ETCDIR}/pdagent.conf.sample .include Index: head/net-mgmt/py-pdagent/files/pdagentd.in =================================================================== --- head/net-mgmt/py-pdagent/files/pdagentd.in (revision 466568) +++ head/net-mgmt/py-pdagent/files/pdagentd.in (revision 466569) @@ -1,48 +1,46 @@ #!/bin/sh # # Author: Mark Felder # # $FreeBSD$ # # PROVIDE: pdagentd # REQUIRE: LOGIN # KEYWORD: shutdown # Add the following lines to /etc/rc.conf to enable pdagentd: # pdagentd_enable="YES" . /etc/rc.subr name="pdagentd" rcvar=pdagentd_enable load_rc_config $name : ${pdagentd_enable="NO"} -: ${pdagentd_user:="nobody"} -: ${pdagentd_group:="nogroup"} +: ${pdagentd_user:="pdagent"} +: ${pdagentd_group:="pdagent"} pidfile="/var/run/pdagent/pdagentd.pid" command="%%PREFIX%%/bin/pdagentd.py" start_precmd=pdagentd_precmd procname=%%PYTHON_CMD%% pdagent_mkdirs="/var/db/pdagent /var/db/pdagent/outqueue /var/db/pdagent/db /var/db/pdagent/outqueue/pdq \ /var/db/pdagent/outqueue/tmp /var/db/pdagent/outqueue/suc /var/db/pdagent/outqueue/err" pdagentd_precmd() { for i in ${pdagent_mkdirs}; do install -d -o ${pdagentd_user} -g ${pdagentd_group} -m 775 ${i} done - if [ ! -d /var/log/pdagent ]; then - install -d -o ${pdagentd_user} /var/log/pdagent - fi - if [ ! -d /var/run/pdagent ]; then - install -d -o ${pdagentd_user} /var/run/pdagent - fi + chown -R ${pdagentd_user}:${pdagentd_group} /var/db/pdagent + + install -d -o ${pdagentd_user} /var/log/pdagent + install -d -o ${pdagentd_user} /var/run/pdagent } run_rc_command "$1" Index: head/net-mgmt/py-pdagent/pkg-message =================================================================== --- head/net-mgmt/py-pdagent/pkg-message (nonexistent) +++ head/net-mgmt/py-pdagent/pkg-message (revision 466569) @@ -0,0 +1,6 @@ +!!! NOTICE !!! + +You must add the required users and service accounts to the pdagent +group to permit write access to /var/db/pdagent. + +!!! NOTICE !!! Property changes on: head/net-mgmt/py-pdagent/pkg-message ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property