Fix starting and stopping munin-asyncd. [1]
Turns out creating a start_cmd function is not enough, you have to add a variable, start_cmd and point it to the start_cmd function. As for stopping it, it should work out of the box, but for the fact that munin-asyncd uses setproctitle or something, and it confuses the hell out of rc.subr. While there, pet rclint. PR: 221000 [1] (based on) Submitted by: marcel herrbischoff com Sponsored by: Absolight
This commit is contained in:
parent
c19c5e0596
commit
4f1b61e45c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=447210
4 changed files with 25 additions and 12 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
PORTNAME= munin
|
PORTNAME= munin
|
||||||
PORTVERSION= ${MUNIN_VERSION}
|
PORTVERSION= ${MUNIN_VERSION}
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= sysutils perl5
|
CATEGORIES= sysutils perl5
|
||||||
MASTER_SITES= ${MUNIN_SITES}
|
MASTER_SITES= ${MUNIN_SITES}
|
||||||
PKGNAMESUFFIX= -node
|
PKGNAMESUFFIX= -node
|
||||||
|
@ -73,6 +74,7 @@ post-patch:
|
||||||
@${FIND} ${WRKSRC}/node/sbin -type f -name "*.orig" -delete
|
@${FIND} ${WRKSRC}/node/sbin -type f -name "*.orig" -delete
|
||||||
|
|
||||||
post-install:
|
post-install:
|
||||||
|
${REINPLACE_CMD} -i '' -e '1s,${PERL5},${PERL},' ${STAGEDIR}${PREFIX}/bin/munindoc
|
||||||
${MKDIR} ${STAGEDIR}${DBDIR}/plugin-state ${STAGEDIR}${SPOOLDIR}/async
|
${MKDIR} ${STAGEDIR}${DBDIR}/plugin-state ${STAGEDIR}${SPOOLDIR}/async
|
||||||
${INSTALL_SCRIPT} ${.CURDIR}/plugins/* ${STAGEDIR}${DATADIR}/plugins/
|
${INSTALL_SCRIPT} ${.CURDIR}/plugins/* ${STAGEDIR}${DATADIR}/plugins/
|
||||||
${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf \
|
${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf \
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
#
|
#
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
|
|
||||||
# PROVIDE: munin-asyncd
|
# PROVIDE: munin-asyncd
|
||||||
# REQUIRE: DAEMON munin-node
|
# REQUIRE: DAEMON munin-node
|
||||||
# BEFORE: cron
|
# BEFORE: cron
|
||||||
# KEYWORD: shutdown
|
# KEYWORD: shutdown
|
||||||
|
|
||||||
#
|
#
|
||||||
# Add the following lines to /etc/rc.conf to enable munin-asyncd:
|
# Add the following lines to /etc/rc.conf to enable munin-asyncd:
|
||||||
# munin_asyncd_enable (bool): Set to "NO" by default.
|
# munin_asyncd_enable (bool): Set to "NO" by default.
|
||||||
|
@ -19,17 +21,20 @@
|
||||||
. /etc/rc.subr
|
. /etc/rc.subr
|
||||||
|
|
||||||
name=munin_asyncd
|
name=munin_asyncd
|
||||||
|
desc="munin asynchronous gathering daemon"
|
||||||
rcvar=munin_asyncd_enable
|
rcvar=munin_asyncd_enable
|
||||||
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
|
|
||||||
: ${munin_asyncd_enable:=NO}
|
|
||||||
: ${munin_asyncd_spool:=%%SPOOLDIR%%/async}
|
|
||||||
: ${munin_asyncd_host:=localhost:4949}
|
|
||||||
|
|
||||||
command="%%DATADIR%%/munin-asyncd"
|
command="%%DATADIR%%/munin-asyncd"
|
||||||
command_interpreter="%%PREFIX%%/bin/perl"
|
command_interpreter="%%LOCALBASE%%/bin/perl"
|
||||||
pidfile="/var/run/${name}.pid"
|
pidfile="/var/run/${name}.pid"
|
||||||
|
start_cmd=start_cmd
|
||||||
|
stop_cmd='pkill -${sig_stop:-TERM} -U %%USER%% -F ${pidfile}'
|
||||||
|
|
||||||
|
munin_asyncd_enable=${munin_asyncd_enable:-NO}
|
||||||
|
munin_asyncd_spool=${munin_asyncd_spool:-%%SPOOLDIR%%/async}
|
||||||
|
munin_asyncd_host=${munin_asyncd_host:-localhost:4949}
|
||||||
|
|
||||||
start_cmd()
|
start_cmd()
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
#
|
#
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
|
|
||||||
# PROVIDE: munin-node
|
# PROVIDE: munin-node
|
||||||
# REQUIRE: DAEMON
|
# REQUIRE: DAEMON
|
||||||
# BEFORE: cron
|
# BEFORE: cron
|
||||||
# KEYWORD: shutdown
|
# KEYWORD: shutdown
|
||||||
|
|
||||||
#
|
#
|
||||||
# Add the following lines to /etc/rc.conf to enable munin-node:
|
# Add the following lines to /etc/rc.conf to enable munin-node:
|
||||||
# munin_node_enable (bool): Set to "NO" by default.
|
# munin_node_enable (bool): Set to "NO" by default.
|
||||||
|
@ -16,19 +18,20 @@
|
||||||
. /etc/rc.subr
|
. /etc/rc.subr
|
||||||
|
|
||||||
name=munin_node
|
name=munin_node
|
||||||
|
desc="munin node daemon"
|
||||||
rcvar=munin_node_enable
|
rcvar=munin_node_enable
|
||||||
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
|
|
||||||
: ${munin_node_enable:=NO}
|
|
||||||
: ${munin_node_config="%%PREFIX%%/etc/munin/munin-node.conf"}
|
|
||||||
|
|
||||||
command="%%PREFIX%%/sbin/munin-node"
|
command="%%PREFIX%%/sbin/munin-node"
|
||||||
command_interpreter="%%PREFIX%%/bin/perl"
|
command_interpreter="%%LOCALBASE%%/bin/perl"
|
||||||
start_precmd=find_pidfile
|
start_precmd=find_pidfile
|
||||||
status_precmd=find_pidfile
|
status_precmd=find_pidfile
|
||||||
stop_precmd=find_pidfile
|
stop_precmd=find_pidfile
|
||||||
|
|
||||||
|
munin_node_enable=${munin_node_enable:-NO}
|
||||||
|
munin_node_config=${munin_node_config:-"%%PREFIX%%/etc/munin/munin-node.conf"}
|
||||||
|
|
||||||
find_pidfile()
|
find_pidfile()
|
||||||
{
|
{
|
||||||
get_pidfile_from_conf pid_file $munin_node_config
|
get_pidfile_from_conf pid_file $munin_node_config
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
#
|
#
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
|
|
||||||
# PROVIDE: munin-sched
|
# PROVIDE: munin-sched
|
||||||
# REQUIRE: DAEMON
|
# REQUIRE: DAEMON
|
||||||
# BEFORE: cron
|
# BEFORE: cron
|
||||||
# KEYWORD: shutdown
|
# KEYWORD: shutdown
|
||||||
|
|
||||||
#
|
#
|
||||||
# Add the following lines to /etc/rc.conf to enable munin-sched:
|
# Add the following lines to /etc/rc.conf to enable munin-sched:
|
||||||
# munin_sched_enable (bool): Set to "NO" by default.
|
# munin_sched_enable (bool): Set to "NO" by default.
|
||||||
|
@ -16,18 +18,19 @@
|
||||||
. /etc/rc.subr
|
. /etc/rc.subr
|
||||||
|
|
||||||
name=munin_sched
|
name=munin_sched
|
||||||
|
desc="munin scheduler daemon"
|
||||||
rcvar=munin_sched_enable
|
rcvar=munin_sched_enable
|
||||||
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
|
|
||||||
: ${munin_sched_enable:=NO}
|
|
||||||
: ${munin_sched_config="%%PREFIX%%/etc/munin/munin-node.conf"}
|
|
||||||
|
|
||||||
command="%%PREFIX%%/sbin/munin-sched"
|
command="%%PREFIX%%/sbin/munin-sched"
|
||||||
start_precmd=find_pidfile
|
start_precmd=find_pidfile
|
||||||
status_precmd=find_pidfile
|
status_precmd=find_pidfile
|
||||||
stop_precmd=find_pidfile
|
stop_precmd=find_pidfile
|
||||||
|
|
||||||
|
munin_sched_enable=${munin_sched_enable:-NO}
|
||||||
|
munin_sched_config=${munin_sched_config:-"%%PREFIX%%/etc/munin/munin-node.conf"}
|
||||||
|
|
||||||
find_pidfile()
|
find_pidfile()
|
||||||
{
|
{
|
||||||
get_pidfile_from_conf pid_file $munin_sched_config
|
get_pidfile_from_conf pid_file $munin_sched_config
|
||||||
|
|
Loading…
Reference in a new issue