diff options
Diffstat (limited to 'sysutils/munin-node')
| -rw-r--r-- | sysutils/munin-node/files/munin-node.in | 12 | ||||
| -rw-r--r-- | sysutils/munin-node/files/munin-sched.in | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/sysutils/munin-node/files/munin-node.in b/sysutils/munin-node/files/munin-node.in index e59f4dd135cd..9784e3176fb2 100644 --- a/sysutils/munin-node/files/munin-node.in +++ b/sysutils/munin-node/files/munin-node.in @@ -15,7 +15,7 @@ . /etc/rc.subr -name="munin_node" +name=munin_node rcvar=munin_node_enable load_rc_config $name @@ -31,12 +31,8 @@ stop_precmd=find_pidfile find_pidfile() { - if type get_pidfile_from_conf >/dev/null 2>&1 && - get_pidfile_from_conf pid_file $munin_node_config; then - pidfile="$_pidfile_from_conf" - else - pidfile=`awk '$1 == "pid_file" { print $2 }' $munin_node_config` - fi + get_pidfile_from_conf pid_file $munin_node_config + pidfile="$_pidfile_from_conf" } -run_rc_command "$1" +run_rc_command $1 diff --git a/sysutils/munin-node/files/munin-sched.in b/sysutils/munin-node/files/munin-sched.in index c88ad6ab3d0f..45e76b661043 100644 --- a/sysutils/munin-node/files/munin-sched.in +++ b/sysutils/munin-node/files/munin-sched.in @@ -15,7 +15,7 @@ . /etc/rc.subr -name="munin_sched" +name=munin_sched rcvar=munin_sched_enable load_rc_config $name @@ -30,13 +30,9 @@ stop_precmd=find_pidfile find_pidfile() { - if type get_pidfile_from_conf >/dev/null 2>&1 && - get_pidfile_from_conf pid_file $munin_sched_config; then - pidfile="${_pidfile_from_conf%node*}sched" - pidfile="${pidfile}${_pidfile_from_conf#*node}" - else - pidfile=`awk '$1 == "pid_file" { gsub("node","sched",$2); print $2; }' $munin_sched_config` - fi + get_pidfile_from_conf pid_file $munin_sched_config + pidfile="${_pidfile_from_conf%node*}sched" + pidfile="${pidfile}${_pidfile_from_conf#*node}" } run_rc_command "$1" |
