mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 17:29:23 -04:00
Devmon is a Perl daemon designed to supplement and enhance the monitoring
capabilities of a server running either the BigBrother or Hobbit monitoring software. WWW: http://devmon.sourceforge.net/ PR: ports/176427 Submitted by: Mark Felder <feld@feld.me>
This commit is contained in:
parent
01084cc740
commit
c4a7ff67b3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=313295
6 changed files with 144 additions and 0 deletions
|
@ -54,6 +54,7 @@
|
|||
SUBDIR += cowpatty
|
||||
SUBDIR += cricket
|
||||
SUBDIR += darkstat
|
||||
SUBDIR += devmon
|
||||
SUBDIR += dhcdrop
|
||||
SUBDIR += disco
|
||||
SUBDIR += docsis
|
||||
|
|
50
net-mgmt/devmon/Makefile
Normal file
50
net-mgmt/devmon/Makefile
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Created by: Mark Felder <feld@feld.me>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= devmon
|
||||
DISTVERSION= 0.3.1-beta1
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${DISTVERSION}
|
||||
|
||||
MAINTAINER= feld@feld.me
|
||||
COMMENT= Device monitoring addition to Xymon/Hobbit/BigBrother
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
RUN_DEPENDS= p5-SNMP_Session>0:${PORTSDIR}/net-mgmt/p5-SNMP_Session
|
||||
|
||||
USE_PERL5= yes
|
||||
NO_BUILD= yes
|
||||
USE_RC_SUBR= devmon
|
||||
|
||||
OPTIONS_DEFINE= MYSQL
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MMYSQL}
|
||||
USE_MYSQL= yes
|
||||
.endif
|
||||
|
||||
pre-install:
|
||||
(cd ${WRKSRC} && ${MV} devmon.cfg devmon.cfg.dist)
|
||||
|
||||
do-install:
|
||||
${INSTALL} -d ${PREFIX}/devmon
|
||||
${INSTALL} -d ${PREFIX}/devmon/modules
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/devmon ${PREFIX}/devmon/
|
||||
${INSTALL_DATA} ${WRKSRC}/devmon.cfg.dist ${PREFIX}/devmon/
|
||||
(cd ${WRKSRC}/modules && ${COPYTREE_SHARE} \* ${PREFIX}/devmon/modules/)
|
||||
|
||||
post-install:
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/CHANGELOG ${DOCSDIR}/
|
||||
${INSTALL_DATA} ${WRKSRC}/COPYING ${DOCSDIR}/
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
|
||||
${INSTALL} -d ${DOCSDIR}/docs
|
||||
${INSTALL} -d ${DOCSDIR}/extras
|
||||
(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} \* ${DOCSDIR}/docs/)
|
||||
(cd ${WRKSRC}/extras && ${COPYTREE_SHARE} \* ${DOCSDIR}/extras/)
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
2
net-mgmt/devmon/distinfo
Normal file
2
net-mgmt/devmon/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (devmon-0.3.1-beta1.tar.gz) = 37eda1c168809f5e3908b11e1ddd2b8c293b592fec12627cae31714e2e42fea2
|
||||
SIZE (devmon-0.3.1-beta1.tar.gz) = 105893
|
56
net-mgmt/devmon/files/devmon.in
Normal file
56
net-mgmt/devmon/files/devmon.in
Normal file
|
@ -0,0 +1,56 @@
|
|||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
# PROVIDE: devmon
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
: ${devmon_enable="NO"}
|
||||
: ${devmon_config="%%PREFIX%%/devmon/devmon.cfg"}
|
||||
: ${devmon_db="%%PREFIX%%/devmon/hosts.db"}
|
||||
: ${devmon_pid="/var/run/devmon.pid"}
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="devmon"
|
||||
rcvar="devmon_enable"
|
||||
load_rc_config $name
|
||||
command="%%PREFIX%%/devmon/devmon"
|
||||
command_args="-c ${devmon_config} -d ${devmon_db}"
|
||||
command_interpreter="/usr/bin/perl"
|
||||
pidfile=${devmon_pid}
|
||||
|
||||
stop_cmd="devmon_stopcmd"
|
||||
status_cmd="devmon_statuscmd"
|
||||
|
||||
devmon_statuscmd()
|
||||
{
|
||||
if [ ! -e $pidfile ];
|
||||
then
|
||||
echo "pidfile does not exist. $name is not running?";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if pgrep -F $pidfile >/dev/null;
|
||||
then
|
||||
echo "$name is running.";
|
||||
else
|
||||
echo "$name is not running.";
|
||||
exit 1;
|
||||
fi
|
||||
}
|
||||
|
||||
devmon_stopcmd()
|
||||
{
|
||||
if pgrep -F $pidfile >/dev/null;
|
||||
then
|
||||
mypid=`cat $pidfile`;
|
||||
kill $sig_stop $mypid;
|
||||
wait_for_pids $mypid;
|
||||
else
|
||||
echo "$name is not running.";
|
||||
exit 1;
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
5
net-mgmt/devmon/pkg-descr
Normal file
5
net-mgmt/devmon/pkg-descr
Normal file
|
@ -0,0 +1,5 @@
|
|||
Devmon is a Perl daemon designed to supplement and enhance the monitoring
|
||||
capabilities of a server running either the BigBrother or Hobbit monitoring
|
||||
software.
|
||||
|
||||
WWW: http://devmon.sourceforge.net/
|
30
net-mgmt/devmon/pkg-plist
Normal file
30
net-mgmt/devmon/pkg-plist
Normal file
|
@ -0,0 +1,30 @@
|
|||
devmon/modules/dm_tests.pm
|
||||
devmon/modules/dm_templates.pm
|
||||
devmon/modules/dm_snmp.pm
|
||||
devmon/modules/dm_msg.pm
|
||||
devmon/modules/dm_config.pm
|
||||
devmon/devmon.cfg.dist
|
||||
devmon/devmon
|
||||
%%PORTDOCS%%%%DOCSDIR%%/extras/update_hobbit_patch
|
||||
%%PORTDOCS%%%%DOCSDIR%%/extras/hobbit-4.2.0-devmon.patch
|
||||
%%PORTDOCS%%%%DOCSDIR%%/extras/hobbit-4.2.0-devmon-complete.patch
|
||||
%%PORTDOCS%%%%DOCSDIR%%/extras/do_devmon.c
|
||||
%%PORTDOCS%%%%DOCSDIR%%/extras/devmon.initd.redhat
|
||||
%%PORTDOCS%%%%DOCSDIR%%/extras/devmon.db
|
||||
%%PORTDOCS%%%%DOCSDIR%%/extras/devmon-rrd.pl
|
||||
%%PORTDOCS%%%%DOCSDIR%%/extras/devmon-graph.cfg
|
||||
%%PORTDOCS%%%%DOCSDIR%%/docs/using.html
|
||||
%%PORTDOCS%%%%DOCSDIR%%/docs/USING
|
||||
%%PORTDOCS%%%%DOCSDIR%%/docs/TEMPLATES
|
||||
%%PORTDOCS%%%%DOCSDIR%%/docs/MULTINODE
|
||||
%%PORTDOCS%%%%DOCSDIR%%/docs/INSTALLATION
|
||||
%%PORTDOCS%%%%DOCSDIR%%/docs/GRAPHING
|
||||
%%PORTDOCS%%%%DOCSDIR%%/docs/COPYING
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
%%PORTDOCS%%%%DOCSDIR%%/COPYING
|
||||
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
|
||||
@dirrm devmon/modules
|
||||
@dirrm devmon
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/extras
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/docs
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
Loading…
Add table
Reference in a new issue