Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Sep 2017 17:37:53 +0000 (UTC)
From:      Mark Felder <feld@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r449844 - in head/net-mgmt: . py-pdagent py-pdagent/files
Message-ID:  <201709141737.v8EHbrJF024052@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: feld
Date: Thu Sep 14 17:37:53 2017
New Revision: 449844
URL: https://svnweb.freebsd.org/changeset/ports/449844

Log:
  The PagerDuty Agent is a program that lets you easily integrate your
  monitoring system with PagerDuty.
  
  WWW: https://github.com/PagerDuty/pdagent

Added:
  head/net-mgmt/py-pdagent/
  head/net-mgmt/py-pdagent/Makefile   (contents, props changed)
  head/net-mgmt/py-pdagent/distinfo   (contents, props changed)
  head/net-mgmt/py-pdagent/files/
  head/net-mgmt/py-pdagent/files/pdagentd.in   (contents, props changed)
  head/net-mgmt/py-pdagent/pkg-descr   (contents, props changed)
  head/net-mgmt/py-pdagent/pkg-plist   (contents, props changed)
Modified:
  head/net-mgmt/Makefile

Modified: head/net-mgmt/Makefile
==============================================================================
--- head/net-mgmt/Makefile	Thu Sep 14 17:32:10 2017	(r449843)
+++ head/net-mgmt/Makefile	Thu Sep 14 17:37:53 2017	(r449844)
@@ -294,6 +294,7 @@
     SUBDIR += pushgateway
     SUBDIR += py-ipcalc
     SUBDIR += py-ipy
+    SUBDIR += py-pdagent
     SUBDIR += py-pyang
     SUBDIR += py-pysmi
     SUBDIR += py-pyzabbix

Added: head/net-mgmt/py-pdagent/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/py-pdagent/Makefile	Thu Sep 14 17:37:53 2017	(r449844)
@@ -0,0 +1,39 @@
+# Created by: Mark Felder <feld@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	pdagent
+DISTVERSION=	v1.4
+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
+
+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 <bsd.port.mk>

Added: head/net-mgmt/py-pdagent/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/py-pdagent/distinfo	Thu Sep 14 17:37:53 2017	(r449844)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1505398696
+SHA256 (PagerDuty-pdagent-v1.4_GH0.tar.gz) = 69f79d9c912db8e2fa9fed7c0f5f0113968739df316b6a79eec9ac94c368046f
+SIZE (PagerDuty-pdagent-v1.4_GH0.tar.gz) = 248170

Added: head/net-mgmt/py-pdagent/files/pdagentd.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/py-pdagent/files/pdagentd.in	Thu Sep 14 17:37:53 2017	(r449844)
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Author: Mark Felder <feld@FreeBSD.org>
+#
+# $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"}
+
+pidfile="/var/run/pdagent/pdagentd.pid"
+command="%%PREFIX%%/bin/pdagentd.py"
+command_args="${rc_arg}"
+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
+}
+
+run_rc_command "$1"

Added: head/net-mgmt/py-pdagent/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/py-pdagent/pkg-descr	Thu Sep 14 17:37:53 2017	(r449844)
@@ -0,0 +1,4 @@
+The PagerDuty Agent is a program that lets you easily integrate your
+monitoring system with PagerDuty.
+
+WWW: https://github.com/PagerDuty/pdagent

Added: head/net-mgmt/py-pdagent/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/py-pdagent/pkg-plist	Thu Sep 14 17:37:53 2017	(r449844)
@@ -0,0 +1,21 @@
+bin/pd-queue
+bin/pd-send
+bin/pdagentd.py
+@sample etc/pdagent/pdagent.conf.sample
+%%PYTHON_SITELIBDIR%%/pdagent/__init__.py
+%%PYTHON_SITELIBDIR%%/pdagent/confdirs.py
+%%PYTHON_SITELIBDIR%%/pdagent/config.py
+%%PYTHON_SITELIBDIR%%/pdagent/constants.py
+%%PYTHON_SITELIBDIR%%/pdagent/heartbeat.py
+%%PYTHON_SITELIBDIR%%/pdagent/jsonstore.py
+%%PYTHON_SITELIBDIR%%/pdagent/pdagentutil.py
+%%PYTHON_SITELIBDIR%%/pdagent/pdqueue.py
+%%PYTHON_SITELIBDIR%%/pdagent/pdthread.py
+%%PYTHON_SITELIBDIR%%/pdagent/root_certs/ca_certs.pem
+%%PYTHON_SITELIBDIR%%/pdagent/sendevent.py
+%%PYTHON_SITELIBDIR%%/pdagent/thirdparty/__init__.py
+%%PYTHON_SITELIBDIR%%/pdagent/thirdparty/argparse.py
+%%PYTHON_SITELIBDIR%%/pdagent/thirdparty/daemon.py
+%%PYTHON_SITELIBDIR%%/pdagent/thirdparty/filelock.py
+%%PYTHON_SITELIBDIR%%/pdagent/thirdparty/httpswithverify.py
+%%PYTHON_SITELIBDIR%%/pdagent/thirdparty/ssl_match_hostname.py



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709141737.v8EHbrJF024052>