Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Oct 2014 16:02:32 +0000 (UTC)
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r371446 - in head: . sysutils sysutils/sd-agent sysutils/sd-agent/files
Message-ID:  <201410241602.s9OG2WGQ098478@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: matthew
Date: Fri Oct 24 16:02:32 2014
New Revision: 371446
URL: https://svnweb.freebsd.org/changeset/ports/371446
QAT: https://qat.redports.org/buildarchive/r371446/

Log:
  New port: sd-agent
  
  Server Density Agent for FreeBSD
  
  Monitor CPU, memory, disk usage, network, Apache, MySQL + more via the
  ServerDensity platform.
  
  WWW: https://www.serverdensity.com/

Added:
  head/sysutils/sd-agent/
  head/sysutils/sd-agent/Makefile   (contents, props changed)
  head/sysutils/sd-agent/distinfo   (contents, props changed)
  head/sysutils/sd-agent/files/
  head/sysutils/sd-agent/files/patch-agent.py   (contents, props changed)
  head/sysutils/sd-agent/files/sd-agent.in   (contents, props changed)
  head/sysutils/sd-agent/pkg-descr   (contents, props changed)
  head/sysutils/sd-agent/pkg-plist   (contents, props changed)
Modified:
  head/GIDs
  head/UIDs
  head/sysutils/Makefile

Modified: head/GIDs
==============================================================================
--- head/GIDs	Fri Oct 24 16:01:57 2014	(r371445)
+++ head/GIDs	Fri Oct 24 16:02:32 2014	(r371446)
@@ -67,6 +67,7 @@ fetchmail:*:124:
 postfix:*:125:
 maildrop:*:126:
 nav:*:127:
+sd-agent:*:128:
 vlock:*:129:
 _bgpd:*:130:
 _ospfd:*:131:

Modified: head/UIDs
==============================================================================
--- head/UIDs	Fri Oct 24 16:01:57 2014	(r371445)
+++ head/UIDs	Fri Oct 24 16:02:32 2014	(r371446)
@@ -73,6 +73,7 @@ _ntp:*:123:123::0:0:NTP Daemon:/var/empt
 fetchmail:*:124:124::0:0:Fetchmail mail-retrieval daemon:/nonexistent:/usr/sbin/nologin
 postfix:*:125:125::0:0:Postfix Mail System:/var/spool/postfix:/usr/sbin/nologin
 navcron:*:127:127::0:0:Network Administration Visualized:/usr/local/nav:/usr/sbin/nologin
+sd-agent:*:128:128::0:0:ServerDensity Agent:/nonexistent:/usr/sbin/nologin
 _bgpd:*:130:130::0:0:BGP Daemon:/var/empty:/usr/sbin/nologin
 _ospfd:*:131:131::0:0:OSPF Daemon:/var/empty:/usr/sbin/nologin
 _spamd:*:132:132::0:0:Spam Daemon:/var/empty:/usr/sbin/nologin

Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile	Fri Oct 24 16:01:57 2014	(r371445)
+++ head/sysutils/Makefile	Fri Oct 24 16:02:32 2014	(r371446)
@@ -852,6 +852,7 @@
     SUBDIR += screenfetch
     SUBDIR += screenie
     SUBDIR += scterc
+    SUBDIR += sd-agent
     SUBDIR += sdd
     SUBDIR += sdparm
     SUBDIR += searchmonkey

Added: head/sysutils/sd-agent/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/sd-agent/Makefile	Fri Oct 24 16:02:32 2014	(r371446)
@@ -0,0 +1,44 @@
+# $FreeBSD$
+
+PORTNAME=	sd-agent
+DISTVERSION=	1.13.4
+CATEGORIES=	sysutils
+
+MAINTAINER=	tim@wallago.co.uk
+COMMENT=	Server Density Agent for FreeBSD
+
+LICENSE=	BSD3CLAUSE
+
+RUN_DEPENDS=	$(LOCALBASE)/sbin/sysinfo:$(PORTSDIR)/sysutils/sysinfo
+
+USERS=		sd-agent
+GROUPS=		sd-agent
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	serverdensity
+GH_COMMIT=	1bacffa
+
+USES=		python shebangfix
+SHEBANG_FILES=	agent.py
+python_OLD_CMD=	/usr/bin/env python
+
+USE_RC_SUBR=	$(PORTNAME)
+SUB_LIST+=	RCNAME=$(PORTNAME:S/-/_/g)
+
+NO_ARCH=	yes
+
+INSTALLDIR=	$(STAGEDIR)$(PREFIX)/libexec/$(PORTNAME)
+FLIST=		agent.py checks.py daemon.py logtail.py minjson.py pep8.sh plugins.py sd-deploy.py
+
+do-build::
+	$(SED) -i .bak 's,%%PREFIX%%,$(PREFIX),' $(WRKSRC)/agent.py
+
+do-install::
+	$(MKDIR) $(INSTALLDIR)/plugins
+.for f in $(FLIST)
+	$(INSTALL_SCRIPT) $(WRKSRC)/$f $(INSTALLDIR)
+.endfor
+	$(MKDIR) $(STAGEDIR)$(ETCDIR)
+	$(INSTALL_DATA) $(WRKSRC)/config.cfg $(STAGEDIR)$(ETCDIR)/config.cfg.sample
+
+.include <bsd.port.mk>

Added: head/sysutils/sd-agent/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/sd-agent/distinfo	Fri Oct 24 16:02:32 2014	(r371446)
@@ -0,0 +1,2 @@
+SHA256 (sd-agent-1.13.4.tar.gz) = 464f2238e8344d461584cc676af0bfd88851db08ce501e0912150ea0f26795b9
+SIZE (sd-agent-1.13.4.tar.gz) = 50647

Added: head/sysutils/sd-agent/files/patch-agent.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/sd-agent/files/patch-agent.py	Fri Oct 24 16:02:32 2014	(r371446)
@@ -0,0 +1,17 @@
+--- agent.py.orig	2014-10-24 11:01:07 UTC
++++ agent.py
+@@ -64,10 +64,10 @@
+ 
+     config = ConfigParser.ConfigParser()
+ 
+-    if os.path.exists('/etc/sd-agent/conf.d/'):
+-        configPath = '/etc/sd-agent/conf.d/'
+-    elif os.path.exists('/etc/sd-agent/config.cfg'):
+-        configPath = '/etc/sd-agent/config.cfg'
++    if os.path.exists('%%PREFIX%%/etc/sd-agent/conf.d/'):
++        configPath = '%%PREFIX%%/etc/sd-agent/conf.d/'
++    elif os.path.exists('%%PREFIX%%/etc/sd-agent/config.cfg'):
++        configPath = '%%PREFIX%%/etc/sd-agent/config.cfg'
+     else:
+         configPath = path + '/config.cfg'
+ 

Added: head/sysutils/sd-agent/files/sd-agent.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/sd-agent/files/sd-agent.in	Fri Oct 24 16:02:32 2014	(r371446)
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# PROVIDE: %%RCNAME%%
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name=%%RCNAME%%
+rcvar=%%RCNAME%%_enable
+pidfile="/var/run/sd-agent/sd-agent.pid"
+logfile="/var/log/sd-agent/sd-agent.log"
+
+start_precmd="${name}_prestart"
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+status_cmd="${name}_status"
+
+load_rc_config $name
+: ${%%RCNAME%%_enable:=no}
+
+%%RCNAME%%_user=sd-agent
+%%RCNAME%%_group=sd-agent
+
+command='%%PREFIX%%/libexec/sd-agent/agent.py'
+
+%%RCNAME%%_prestart()
+{
+	install -d -o ${%%RCNAME%%_user} -g ${%%RCNAME%%_group} \
+	    $(dirname $pidfile)
+	install -d -o ${%%RCNAME%%_user} -g ${%%RCNAME%%_group} \
+	    $(dirname $logfile)
+}
+
+%%RCNAME%%_start()
+{
+	su -m ${%%RCNAME%%_user} -c "$command start init"
+}
+
+%%RCNAME%%_stop()
+{
+	$command stop init
+}
+
+%%RCNAME%%_status()
+{
+	$command status init
+}
+
+run_rc_command "$1"

Added: head/sysutils/sd-agent/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/sd-agent/pkg-descr	Fri Oct 24 16:02:32 2014	(r371446)
@@ -0,0 +1,6 @@
+Server Density Agent for FreeBSD
+
+Monitor CPU, memory, disk usage, network, Apache, MySQL + more via the
+ServerDensity platform.
+
+WWW: https://www.serverdensity.com/

Added: head/sysutils/sd-agent/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/sd-agent/pkg-plist	Fri Oct 24 16:02:32 2014	(r371446)
@@ -0,0 +1,10 @@
+@sample %%ETCDIR%%/config.cfg.sample
+libexec/sd-agent/agent.py
+libexec/sd-agent/checks.py
+libexec/sd-agent/daemon.py
+libexec/sd-agent/logtail.py
+libexec/sd-agent/minjson.py
+libexec/sd-agent/pep8.sh
+libexec/sd-agent/plugins.py
+libexec/sd-agent/sd-deploy.py
+@dir libexec/sd-agent/plugins



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