mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-30 10:38:37 +00:00
Install munin-async and munin-asyncd with munin-node.
PR: 211159 Reported by: axel axel re Sponsored by: Absolight
This commit is contained in:
parent
47669f5780
commit
ed31947b52
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=418783
@ -134,7 +134,17 @@
|
||||
fi \
|
||||
done
|
||||
|
||||
@@ -183,7 +166,7 @@ install-async:
|
||||
@@ -176,14 +159,14 @@ install-plugins-java: build-plugins-java
|
||||
install-async-prime: install-async
|
||||
|
||||
install-async:
|
||||
- mkdir -p $(LIBDIR)
|
||||
- $(INSTALL) -m 0755 build/node/_bin/munin-async $(LIBDIR)/
|
||||
- $(INSTALL) -m 0755 build/node/_bin/munin-asyncd $(LIBDIR)/
|
||||
+ mkdir -p $(DESTDIR)$(LIBDIR)
|
||||
+ $(INSTALL) -m 0755 build/node/_bin/munin-async $(DESTDIR)$(LIBDIR)/
|
||||
+ $(INSTALL) -m 0755 build/node/_bin/munin-asyncd $(DESTDIR)$(LIBDIR)/
|
||||
|
||||
install-node-prime: install-node-pre install-node
|
||||
|
||||
install-node-pre: build/node/munin-node.conf install-pre
|
||||
|
@ -29,6 +29,7 @@ MAKE_ARGS= ${MUNIN_DIRS} \
|
||||
USERS= munin
|
||||
GROUPS= munin
|
||||
PLIST_SUB= ${MUNIN_DIRS} USER=${USERS} GROUP=${GROUPS}
|
||||
SUB_LIST= ${MUNIN_DIRS} USER=${USERS} GROUP=${GROUPS}
|
||||
|
||||
CPE_VENDOR= munin-monitoring
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= munin
|
||||
PORTVERSION= ${MUNIN_VERSION}
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= sysutils perl5
|
||||
MASTER_SITES= ${MUNIN_SITES}
|
||||
PKGNAMESUFFIX= -node
|
||||
@ -32,8 +32,8 @@ SHEBANG_FILES= node/sbin/munin-node node/sbin/munin-sched \
|
||||
|
||||
.include "${.CURDIR}/../munin-common/munin.mk"
|
||||
|
||||
ALL_TARGET= build-node build-plugins
|
||||
INSTALL_TARGET= install-node-prime install-plugins-prime
|
||||
ALL_TARGET= build-node build-plugins build/node/_bin/munin-async build/node/_bin/munin-asyncd
|
||||
INSTALL_TARGET= install-node-prime install-async-prime install-plugins-prime
|
||||
NO_ARCH= yes
|
||||
|
||||
OPTIONS_DEFINE= SNMP PERL JAVA
|
||||
@ -55,7 +55,7 @@ JAVA_BUILD= yes
|
||||
JAVA_RUN= yes
|
||||
|
||||
SUB_FILES= pkg-message plugins.conf
|
||||
USE_RC_SUBR= munin-node munin-sched
|
||||
USE_RC_SUBR= munin-asyncd munin-node munin-sched
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
|
||||
@ -72,9 +72,7 @@ post-patch:
|
||||
@${FIND} ${WRKSRC}/node/sbin -type f -name "*.orig" -delete
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${STAGEDIR}${DBDIR}/plugin-state
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/munin-node \
|
||||
${STAGEDIR}${PREFIX}/etc/rc.d/munin-node
|
||||
${MKDIR} ${STAGEDIR}${DBDIR}/plugin-state ${STAGEDIR}${SPOOLDIR}/async
|
||||
${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf \
|
||||
${STAGEDIR}${ETCDIR}/munin-node.conf.sample
|
||||
${INSTALL_DATA} ${WRKDIR}/plugins.conf \
|
||||
|
40
sysutils/munin-node/files/munin-asyncd.in
Normal file
40
sysutils/munin-node/files/munin-asyncd.in
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: munin-asyncd
|
||||
# REQUIRE: DAEMON munin-node
|
||||
# BEFORE: cron
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable munin-asyncd:
|
||||
# munin_asyncd_enable (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable munin-asyncd
|
||||
# munin_asyncd_spool: The spool directory, default:
|
||||
# %%DBDIR%%/async
|
||||
# munin_asyncd_host: Host to connect to, default: localhost:4949
|
||||
# munin_asyncd_args: Extra args to pass to munin-asyncd
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=munin_asyncd
|
||||
rcvar=munin_asyncd_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${munin_asyncd_enable:=NO}
|
||||
: ${munin_asyncd_spool:=%%SPOOLDIR%%/async}
|
||||
: ${munin_asyncd_host:=localhost:4949}
|
||||
|
||||
command="%%DATADIR%%/munin-asyncd"
|
||||
command_interpreter="%%PREFIX%%/bin/perl"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
|
||||
start_cmd()
|
||||
{
|
||||
check_startmsgs && echo "Starting ${name}."
|
||||
daemon -u %%USER%% -f -p ${pidfile} ${command_interpreter} ${command} --spool ${munin_asyncd_spool} --host ${munin_asyncd_host} ${munin_asyncd_args}
|
||||
}
|
||||
|
||||
run_rc_command $1
|
@ -50,6 +50,8 @@ sbin/munin-node
|
||||
sbin/munin-node-configure
|
||||
sbin/munin-run
|
||||
sbin/munin-sched
|
||||
%%DATADIR%%/munin-async
|
||||
%%DATADIR%%/munin-asyncd
|
||||
%%JAVA%%%%DATADIR%%/munin-jmx-plugins.jar
|
||||
%%DATADIR%%/plugins/amavis
|
||||
%%DATADIR%%/plugins/apache_accesses
|
||||
@ -251,4 +253,6 @@ sbin/munin-sched
|
||||
%%DATADIR%%/plugins/zimbra_
|
||||
@dir(%%USER%%,%%GROUP%%,) %%DBDIRNODE%%/plugin-state
|
||||
@dir %%ETCDIR%%/plugins
|
||||
@dir(%%USER%%,%%GROUP%%,) %%SPOOLDIR%%/async
|
||||
@comment @dir %%SPOOLDIR%%
|
||||
@comment @dir %%DBDIRNODE%%
|
||||
|
Loading…
Reference in New Issue
Block a user