mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
- Update to new LIB_DEPENDS format
- Support STAGE - Clean up rc script - Move example configs to new .sample naming convention Sponsored by: SupraNet Communications, Inc
This commit is contained in:
parent
7d781a85ca
commit
03f44da6f4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=361779
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= smokeping
|
||||
PORTVERSION= 2.6.9
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net-mgmt www
|
||||
MASTER_SITES= http://oss.oetiker.ch/smokeping/pub/ \
|
||||
http://smokeping.cs.pu.edu.tw/pub/
|
||||
@ -10,7 +11,9 @@ MASTER_SITES= http://oss.oetiker.ch/smokeping/pub/ \
|
||||
MAINTAINER= rodrigo@FreeBSD.org
|
||||
COMMENT= Latency logging and graphing system
|
||||
|
||||
LIB_DEPENDS= rrd:${PORTSDIR}/databases/rrdtool
|
||||
LICENSE= GPLv2
|
||||
|
||||
LIB_DEPENDS= librrd.so:${PORTSDIR}/databases/rrdtool
|
||||
BUILD_DEPENDS= p5-CGI-Session>=0:${PORTSDIR}/www/p5-CGI-Session \
|
||||
p5-Digest-HMAC>=0:${PORTSDIR}/security/p5-Digest-HMAC \
|
||||
p5-SNMP_Session>=0:${PORTSDIR}/net-mgmt/p5-SNMP_Session \
|
||||
@ -32,69 +35,6 @@ HTDOCSDIR= ${PREFIX}/smokeping/htdocs
|
||||
|
||||
USE_RC_SUBR= smokeping
|
||||
|
||||
MAN1= smokeping.1 \
|
||||
smokeping_cgi.1 \
|
||||
tSmoke.1
|
||||
MAN3= Smokeping_matchers_Avgratio.3 \
|
||||
Smokeping_matchers_CheckLatency.3 \
|
||||
Smokeping_matchers_CheckLoss.3 \
|
||||
Smokeping_matchers_ExpLoss.3 \
|
||||
Smokeping_matchers_Median.3 \
|
||||
Smokeping_matchers_Medratio.3 \
|
||||
Smokeping_matchers_base.3 \
|
||||
Smokeping_probes_AnotherDNS.3 \
|
||||
Smokeping_probes_AnotherSSH.3 \
|
||||
Smokeping_probes_CiscoRTTMonDNS.3 \
|
||||
Smokeping_probes_CiscoRTTMonEchoICMP.3 \
|
||||
Smokeping_probes_CiscoRTTMonTcpConnect.3 \
|
||||
Smokeping_probes_Curl.3 \
|
||||
Smokeping_probes_DNS.3 \
|
||||
Smokeping_probes_DismanPing.3 \
|
||||
Smokeping_probes_EchoPing.3 \
|
||||
Smokeping_probes_EchoPingChargen.3 \
|
||||
Smokeping_probes_EchoPingDNS.3 \
|
||||
Smokeping_probes_EchoPingDiscard.3 \
|
||||
Smokeping_probes_EchoPingHttp.3 \
|
||||
Smokeping_probes_EchoPingHttps.3 \
|
||||
Smokeping_probes_EchoPingIcp.3 \
|
||||
Smokeping_probes_EchoPingLDAP.3 \
|
||||
Smokeping_probes_EchoPingPlugin.3 \
|
||||
Smokeping_probes_EchoPingSmtp.3 \
|
||||
Smokeping_probes_EchoPingWhois.3 \
|
||||
Smokeping_probes_FPing.3 \
|
||||
Smokeping_probes_FPing6.3 \
|
||||
Smokeping_probes_FTPtransfer.3 \
|
||||
Smokeping_probes_IOSPing.3 \
|
||||
Smokeping_probes_LDAP.3 \
|
||||
Smokeping_probes_NFSping.3 \
|
||||
Smokeping_probes_OpenSSHJunOSPing.3 \
|
||||
Smokeping_probes_Radius.3 \
|
||||
Smokeping_probes_RemoteFPing.3 \
|
||||
Smokeping_probes_SendEmail.3 \
|
||||
Smokeping_probes_SSH.3 \
|
||||
Smokeping_probes_SipSak.3 \
|
||||
Smokeping_probes_TCPPing.3 \
|
||||
Smokeping_probes_TacacsPlus.3 \
|
||||
Smokeping_probes_TelnetIOSPing.3 \
|
||||
Smokeping_probes_TelnetJunOSPing.3 \
|
||||
Smokeping_probes_WebProxyFilter.3 \
|
||||
Smokeping_probes_base.3 \
|
||||
Smokeping_probes_basefork.3 \
|
||||
Smokeping_probes_basevars.3 \
|
||||
Smokeping_probes_passwordchecker.3 \
|
||||
Smokeping_probes_skel.3 \
|
||||
Smokeping_sorters_Loss.3 \
|
||||
Smokeping_sorters_Max.3 \
|
||||
Smokeping_sorters_Median.3 \
|
||||
Smokeping_sorters_StdDev.3 \
|
||||
Smokeping_sorters_base.3
|
||||
MAN5= smokeping_config.5 \
|
||||
smokeping_examples.5
|
||||
MAN7= smokeping_extend.7 \
|
||||
smokeping_install.7 \
|
||||
smokeping_master_slave.7 \
|
||||
smokeping_upgrade.7
|
||||
|
||||
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
|
||||
|
||||
USERS= smokeping
|
||||
@ -116,7 +56,6 @@ DNS_DESC= Support for AnotherDNS probes
|
||||
OPTIONS_DEFINE= ECHOPING CURL RADIUS TELNET DNS FPING LDAP LDAPSSL
|
||||
OPTIONS_DEFAULT= FPING
|
||||
|
||||
NO_STAGE= yes
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MFPING}
|
||||
@ -165,14 +104,14 @@ post-patch:
|
||||
${WRKSRC}/bin/tSmoke
|
||||
|
||||
post-install:
|
||||
.for FILE in basepage.html config smokemail tmail
|
||||
[ -f ${ETCDIR}/${FILE} ] || ${CP} ${ETCDIR}/${FILE}.dist ${ETCDIR}/${FILE}
|
||||
.for FILE in basepage.html config smokemail smokeping_secrets tmail
|
||||
${MV} ${STAGEDIR}/${ETCDIR}/${FILE}.dist ${STAGEDIR}/${ETCDIR}/${FILE}.sample
|
||||
.endfor
|
||||
[ -f ${PREFIX}/smokeping/htdocs/smokeping.fcgi ] || ${CP} ${PREFIX}/smokeping/htdocs/smokeping.fcgi.dist ${PREFIX}/smokeping/htdocs/smokeping.fcgi
|
||||
${MKDIR} ${PREFIX}/smokeping/htdocs/img
|
||||
${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/smokeping/htdocs
|
||||
${MKDIR} ${PREFIX}/var/smokeping
|
||||
${CHOWN} -R ${USERS}:${GROUPS} ${PREFIX}/var/smokeping
|
||||
${MV} ${STAGEDIR}/${PREFIX}/smokeping/htdocs/smokeping.fcgi.dist ${STAGEDIR}/${PREFIX}/smokeping/htdocs/smokeping.fcgi.sample
|
||||
|
||||
${MKDIR} ${STAGEDIR}/${PREFIX}/smokeping/htdocs/img
|
||||
${MKDIR} ${STAGEDIR}/${PREFIX}/var/smokeping
|
||||
|
||||
.if !defined(BATCH)
|
||||
${CAT} ${PKGMESSAGE}
|
||||
.endif
|
||||
|
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Created by: Sean McAfee <smcafee@collaborativefusion.com>
|
||||
|
||||
# $FreeBSD$
|
||||
|
||||
# PROVIDE: smokeping
|
||||
@ -14,66 +16,34 @@
|
||||
#
|
||||
# smokeping_flags="<set as needed>"
|
||||
|
||||
smokeping_enable=${smokeping_enable-"NO"}
|
||||
smokeping_pidfile=${smokeping_pidfile-"%%PREFIX%%/var/smokeping/smokeping.pid"}
|
||||
smokeping_logfile=${smokeping_logfile-"/var/log/smokeping.log"}
|
||||
smokeping_user=${smokeping_user-"%%USERS%%"}
|
||||
smokeping_group=${smokeping_group-"%%GROUPS%%"}
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="smokeping"
|
||||
rcvar="smokeping_enable"
|
||||
name=smokeping
|
||||
|
||||
rcvar=smokeping_enable
|
||||
|
||||
load_rc_config $name
|
||||
command="/usr/local/bin/smokeping"
|
||||
|
||||
: ${smokeping_enable:=NO}
|
||||
: ${smokeping_pidfile="%%PREFIX%%/var/smokeping/smokeping.pid"}
|
||||
: ${smokeping_logfile=/var/log/smokeping.log}
|
||||
: ${smokeping_user="%%USERS%%"}
|
||||
: ${smokeping_group="%%GROUPS%%"}
|
||||
|
||||
command=%%PREFIX%%/bin/smokeping
|
||||
command_args="--logfile=${smokeping_logfile}"
|
||||
pidfile="${smokeping_pidfile}"
|
||||
command_interpreter=%%PREFIX%%/bin/perl
|
||||
|
||||
extra_commands="reload"
|
||||
reload_cmd="smokeping_reloadcmd"
|
||||
start_precmd="smokeping_startprecmd"
|
||||
stop_cmd="smokeping_stopcmd"
|
||||
status_cmd="smokeping_statuscmd"
|
||||
|
||||
smokeping_reloadcmd()
|
||||
{
|
||||
$command --reload
|
||||
}
|
||||
|
||||
smokeping_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
|
||||
}
|
||||
|
||||
smokeping_stopcmd()
|
||||
{
|
||||
if pgrep -F $pidfile >/dev/null;
|
||||
then
|
||||
kill $sig_stop `cat $pidfile`;
|
||||
wait_for_pids `cat $pidfile`;
|
||||
else
|
||||
echo "$name is not running.";
|
||||
exit 1;
|
||||
fi
|
||||
}
|
||||
extra_commands=reload
|
||||
reload_cmd="${command} --reload"
|
||||
|
||||
smokeping_startprecmd()
|
||||
{
|
||||
if [ ! -e $smokeping_logfile ];
|
||||
if [ ! -e ${smokeping_logfile} ];
|
||||
then
|
||||
install -o %%USERS%% -g %%GROUPS%% /dev/null $smokeping_logfile || echo "ERROR: Could not initialize logfile at $smokeping_logfile.";
|
||||
install -o %%USERS%% -g %%GROUPS%% /dev/null ${smokeping_logfile} || echo "ERROR: Could not initialize logfile at ${smokeping_logfile}.";
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -2,24 +2,12 @@ bin/smokeinfo
|
||||
bin/smokeping
|
||||
bin/smokeping_cgi
|
||||
bin/tSmoke
|
||||
@unexec if cmp -s %D/etc/smokeping/basepage.html %D/etc/smokeping/basepage.html.dist; then rm -f %D/etc/smokeping/basepage.html; fi
|
||||
etc/smokeping/basepage.html.dist
|
||||
@exec [ -f %B/basepage.html ] || cp %B/%f %B/basepage.html
|
||||
@unexec if cmp -s %D/etc/smokeping/config %D/etc/smokeping/config.dist; then rm -f %D/etc/smokeping/config; fi
|
||||
etc/smokeping/config.dist
|
||||
@exec [ -f %B/config ] || cp %B/%f %B/config
|
||||
@unexec if cmp -s %D/etc/smokeping/smokemail %D/etc/smokeping/smokemail.dist; then rm -f %D/etc/smokeping/smokemail; fi
|
||||
etc/smokeping/smokemail.dist
|
||||
@exec [ -f %B/smokemail ] || cp %B/%f %B/smokemail
|
||||
@unexec if cmp -s %D/etc/smokeping/tmail %D/etc/smokeping/tmail.dist; then rm -f %D/etc/smokeping/tmail; fi
|
||||
etc/smokeping/tmail.dist
|
||||
@exec [ -f %B/tmail ] || cp %B/%f %B/tmail
|
||||
@unexec if cmp -s %D/etc/smokeping/smokeping_secrets %D/etc/smokeping/smokeping_secrets.dist; then rm -f %D/etc/smokeping/smokeping_secrets; fi
|
||||
etc/smokeping/smokeping_secrets.dist
|
||||
@exec [ -f %B/smokeping_secrets ] || cp %B/%f %B/smokeping_secrets
|
||||
@unexec if cmp -s %D/smokeping/htdocs/smokeping.fcgi %D/smokeping/htdocs/smokeping.fcgi.dist; then rm -f %D/smokeping/htdocs/smokeping.fcgi; fi
|
||||
smokeping/htdocs/smokeping.fcgi.dist
|
||||
@exec [ -f %B/smokeping.fcgi ] || cp %B/%f %B/smokeping.fcgi
|
||||
@sample smokeping/htdocs/smokeping.fcgi.sample
|
||||
@sample %%ETCDIR%%/basepage.html.sample
|
||||
@sample %%ETCDIR%%/config.sample
|
||||
@sample %%ETCDIR%%/smokemail.sample
|
||||
@sample %%ETCDIR%%/tmail.sample
|
||||
@sample %%ETCDIR%%/smokeping_secrets.sample
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/config.echoping
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/config.fping-instances
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/config.multiple-probes
|
||||
@ -107,20 +95,81 @@ smokeping/lib/Smokeping/sorters/Max.pm
|
||||
smokeping/lib/Smokeping/sorters/Median.pm
|
||||
smokeping/lib/Smokeping/sorters/StdDev.pm
|
||||
smokeping/lib/Smokeping/sorters/base.pm
|
||||
@dirrmtry etc/smokeping
|
||||
@exec mkdir -p %D/smokeping/htdocs/img; chown www:www %D/smokeping/htdocs/img
|
||||
@unexec rm -rf %D/smokeping/htdocs/img 2>/dev/null || true
|
||||
@exec mkdir -p %D/var/smokeping
|
||||
@exec chown smokeping:smokeping %D/var/smokeping
|
||||
@dirrmtry var/smokeping
|
||||
@dirrmtry var
|
||||
man/man1/smokeping.1.gz
|
||||
man/man1/smokeping_cgi.1.gz
|
||||
man/man1/tSmoke.1.gz
|
||||
man/man3/Smokeping_matchers_Avgratio.3.gz
|
||||
man/man3/Smokeping_matchers_CheckLatency.3.gz
|
||||
man/man3/Smokeping_matchers_CheckLoss.3.gz
|
||||
man/man3/Smokeping_matchers_ExpLoss.3.gz
|
||||
man/man3/Smokeping_matchers_Median.3.gz
|
||||
man/man3/Smokeping_matchers_Medratio.3.gz
|
||||
man/man3/Smokeping_matchers_base.3.gz
|
||||
man/man3/Smokeping_probes_AnotherDNS.3.gz
|
||||
man/man3/Smokeping_probes_AnotherSSH.3.gz
|
||||
man/man3/Smokeping_probes_CiscoRTTMonDNS.3.gz
|
||||
man/man3/Smokeping_probes_CiscoRTTMonEchoICMP.3.gz
|
||||
man/man3/Smokeping_probes_CiscoRTTMonTcpConnect.3.gz
|
||||
man/man3/Smokeping_probes_Curl.3.gz
|
||||
man/man3/Smokeping_probes_DNS.3.gz
|
||||
man/man3/Smokeping_probes_DismanPing.3.gz
|
||||
man/man3/Smokeping_probes_EchoPing.3.gz
|
||||
man/man3/Smokeping_probes_EchoPingChargen.3.gz
|
||||
man/man3/Smokeping_probes_EchoPingDNS.3.gz
|
||||
man/man3/Smokeping_probes_EchoPingDiscard.3.gz
|
||||
man/man3/Smokeping_probes_EchoPingHttp.3.gz
|
||||
man/man3/Smokeping_probes_EchoPingHttps.3.gz
|
||||
man/man3/Smokeping_probes_EchoPingIcp.3.gz
|
||||
man/man3/Smokeping_probes_EchoPingLDAP.3.gz
|
||||
man/man3/Smokeping_probes_EchoPingPlugin.3.gz
|
||||
man/man3/Smokeping_probes_EchoPingSmtp.3.gz
|
||||
man/man3/Smokeping_probes_EchoPingWhois.3.gz
|
||||
man/man3/Smokeping_probes_FPing.3.gz
|
||||
man/man3/Smokeping_probes_FPing6.3.gz
|
||||
man/man3/Smokeping_probes_FTPtransfer.3.gz
|
||||
man/man3/Smokeping_probes_IOSPing.3.gz
|
||||
man/man3/Smokeping_probes_LDAP.3.gz
|
||||
man/man3/Smokeping_probes_NFSping.3.gz
|
||||
man/man3/Smokeping_probes_OpenSSHJunOSPing.3.gz
|
||||
man/man3/Smokeping_probes_Radius.3.gz
|
||||
man/man3/Smokeping_probes_RemoteFPing.3.gz
|
||||
man/man3/Smokeping_probes_SSH.3.gz
|
||||
man/man3/Smokeping_probes_SendEmail.3.gz
|
||||
man/man3/Smokeping_probes_SipSak.3.gz
|
||||
man/man3/Smokeping_probes_TCPPing.3.gz
|
||||
man/man3/Smokeping_probes_TacacsPlus.3.gz
|
||||
man/man3/Smokeping_probes_TelnetIOSPing.3.gz
|
||||
man/man3/Smokeping_probes_TelnetJunOSPing.3.gz
|
||||
man/man3/Smokeping_probes_WebProxyFilter.3.gz
|
||||
man/man3/Smokeping_probes_base.3.gz
|
||||
man/man3/Smokeping_probes_basefork.3.gz
|
||||
man/man3/Smokeping_probes_basevars.3.gz
|
||||
man/man3/Smokeping_probes_passwordchecker.3.gz
|
||||
man/man3/Smokeping_probes_skel.3.gz
|
||||
man/man3/Smokeping_sorters_Loss.3.gz
|
||||
man/man3/Smokeping_sorters_Max.3.gz
|
||||
man/man3/Smokeping_sorters_Median.3.gz
|
||||
man/man3/Smokeping_sorters_StdDev.3.gz
|
||||
man/man3/Smokeping_sorters_base.3.gz
|
||||
man/man5/smokeping_config.5.gz
|
||||
man/man5/smokeping_examples.5.gz
|
||||
man/man7/smokeping_extend.7.gz
|
||||
man/man7/smokeping_install.7.gz
|
||||
man/man7/smokeping_master_slave.7.gz
|
||||
man/man7/smokeping_upgrade.7.gz
|
||||
@dirrm etc/smokeping
|
||||
@dirrm var/smokeping
|
||||
@dirrm var
|
||||
@dirrm smokeping/lib/Smokeping/sorters
|
||||
@dirrm smokeping/lib/Smokeping/probes
|
||||
@dirrm smokeping/lib/Smokeping/matchers
|
||||
@dirrm smokeping/lib/Smokeping
|
||||
@dirrm smokeping/lib
|
||||
@dirrm smokeping/htdocs/img
|
||||
@dirrm smokeping/htdocs/cropper/lib
|
||||
@dirrm smokeping/htdocs/cropper
|
||||
@dirrm smokeping/htdocs
|
||||
@dirrm smokeping
|
||||
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
|
||||
@dirrmtry smokeping
|
||||
@exec mkdir -p %D/smokeping/htdocs/img; chown www:www %D/smokeping/htdocs/img
|
||||
@exec mkdir -p %D/var/smokeping; chown smokeping:smokeping %D/var/smokeping
|
||||
|
Loading…
Reference in New Issue
Block a user