Last active
July 5, 2020 12:30
-
-
Save raven428/2ff88ce529e456a26df8ca171cda9d4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# PROVIDE: munin-node | |
# REQUIRE: DAEMON | |
# BEFORE: cron | |
# KEYWORD: shutdown | |
. /etc/rc.subr | |
name=munin_node | |
rcvar=munin_node_enable | |
load_rc_config $name | |
: ${munin_node_enable:=NO} | |
command='/usr/perl5/home/libs/perl-5.18.4@munin-node/sbin/munin-node' | |
command_interpreter='perl -wT' | |
pidfile='/usr/perl5/home/libs/perl-5.18.4@munin-node/var/run/munin/munin-node.pid' | |
start_cmd="mubrew_start" | |
mubrew_start() { | |
export PERLBREW_ROOT='/usr/perl5/brew' | |
export PERLBREW_HOME='/usr/perl5/home' | |
export SHELL='/bin/sh' | |
/usr/perl5/brew/bin/perlbrew exec \ | |
--with perl-5.18.4@munin-node \ | |
perl -wT \ | |
${command} >/dev/null && | |
echo "Starting ${name}." | |
} | |
run_rc_command $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment