svn commit: r466569 - in head/net-mgmt/py-pdagent: . files
Mark Felder
feld at FreeBSD.org
Thu Apr 5 16:37:20 UTC 2018
Author: feld
Date: Thu Apr 5 16:37:19 2018
New Revision: 466569
URL: https://svnweb.freebsd.org/changeset/ports/466569
Log:
net-mgmt/py-pdagent: Add dedicated user/group
- Also add pkg-message informing how to permit users and services access
PR: 227273
Added:
head/net-mgmt/py-pdagent/pkg-message (contents, props changed)
Modified:
head/net-mgmt/py-pdagent/Makefile
head/net-mgmt/py-pdagent/files/pdagentd.in
Modified: head/net-mgmt/py-pdagent/Makefile
==============================================================================
--- head/net-mgmt/py-pdagent/Makefile Thu Apr 5 16:31:06 2018 (r466568)
+++ head/net-mgmt/py-pdagent/Makefile Thu Apr 5 16:37:19 2018 (r466569)
@@ -4,6 +4,7 @@
PORTNAME= pdagent
PORTVERSION= 1.4
DISTVERSIONPREFIX=v
+PORTREVISION= 1
CATEGORIES= net-mgmt python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -25,6 +26,9 @@ 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
Modified: head/net-mgmt/py-pdagent/files/pdagentd.in
==============================================================================
--- head/net-mgmt/py-pdagent/files/pdagentd.in Thu Apr 5 16:31:06 2018 (r466568)
+++ head/net-mgmt/py-pdagent/files/pdagentd.in Thu Apr 5 16:37:19 2018 (r466569)
@@ -20,8 +20,8 @@ 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"
@@ -37,12 +37,10 @@ pdagentd_precmd()
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"
Added: head/net-mgmt/py-pdagent/pkg-message
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/py-pdagent/pkg-message Thu Apr 5 16:37:19 2018 (r466569)
@@ -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 !!!
More information about the svn-ports-all
mailing list