diff options
author | feld <feld@FreeBSD.org> | 2017-09-15 01:37:53 +0800 |
---|---|---|
committer | feld <feld@FreeBSD.org> | 2017-09-15 01:37:53 +0800 |
commit | d0c1fea7bc36d5c31413023c53d9d118e5f03757 (patch) | |
tree | ccf044f2112af1bde09ec00a8c864db7da8f775e /net-mgmt | |
parent | de1ddbac1651d51f275a5a330342d30ad3ed31c4 (diff) | |
download | freebsd-ports-gnome-d0c1fea7bc36d5c31413023c53d9d118e5f03757.tar.gz freebsd-ports-gnome-d0c1fea7bc36d5c31413023c53d9d118e5f03757.tar.zst freebsd-ports-gnome-d0c1fea7bc36d5c31413023c53d9d118e5f03757.zip |
The PagerDuty Agent is a program that lets you easily integrate your
monitoring system with PagerDuty.
WWW: https://github.com/PagerDuty/pdagent
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/py-pdagent/Makefile | 39 | ||||
-rw-r--r-- | net-mgmt/py-pdagent/distinfo | 3 | ||||
-rw-r--r-- | net-mgmt/py-pdagent/files/pdagentd.in | 49 | ||||
-rw-r--r-- | net-mgmt/py-pdagent/pkg-descr | 4 | ||||
-rw-r--r-- | net-mgmt/py-pdagent/pkg-plist | 21 |
6 files changed, 117 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index d38bb8be689d..28b6ac63a1e8 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -294,6 +294,7 @@ SUBDIR += pushgateway SUBDIR += py-ipcalc SUBDIR += py-ipy + SUBDIR += py-pdagent SUBDIR += py-pyang SUBDIR += py-pysmi SUBDIR += py-pyzabbix diff --git a/net-mgmt/py-pdagent/Makefile b/net-mgmt/py-pdagent/Makefile new file mode 100644 index 000000000000..51fde1b2342c --- /dev/null +++ b/net-mgmt/py-pdagent/Makefile @@ -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> diff --git a/net-mgmt/py-pdagent/distinfo b/net-mgmt/py-pdagent/distinfo new file mode 100644 index 000000000000..10e10fd825ef --- /dev/null +++ b/net-mgmt/py-pdagent/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1505398696 +SHA256 (PagerDuty-pdagent-v1.4_GH0.tar.gz) = 69f79d9c912db8e2fa9fed7c0f5f0113968739df316b6a79eec9ac94c368046f +SIZE (PagerDuty-pdagent-v1.4_GH0.tar.gz) = 248170 diff --git a/net-mgmt/py-pdagent/files/pdagentd.in b/net-mgmt/py-pdagent/files/pdagentd.in new file mode 100644 index 000000000000..e8736fa7c490 --- /dev/null +++ b/net-mgmt/py-pdagent/files/pdagentd.in @@ -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" diff --git a/net-mgmt/py-pdagent/pkg-descr b/net-mgmt/py-pdagent/pkg-descr new file mode 100644 index 000000000000..b3fb8a966ae0 --- /dev/null +++ b/net-mgmt/py-pdagent/pkg-descr @@ -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 diff --git a/net-mgmt/py-pdagent/pkg-plist b/net-mgmt/py-pdagent/pkg-plist new file mode 100644 index 000000000000..ece07e69ba7f --- /dev/null +++ b/net-mgmt/py-pdagent/pkg-plist @@ -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 |