Merge pull request #23 from buchtajz/master

Added new freebsd startup script reflecting merged netflow/sflow-asstatd...
This commit is contained in:
Manuel Kasper 2014-03-12 14:06:50 +01:00
commit 812b653dc7
3 changed files with 31 additions and 58 deletions

31
contrib/freebsd/asstatd Executable file
View File

@ -0,0 +1,31 @@
#!/bin/sh
#
# PROVIDE: asstatd
# REQUIRE: DAEMON LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable asstatd:
# asstatd_enable="YES"
# asstatd_flags="<set as needed>"
. /etc/rc.subr
name="asstatd"
rcvar=`set_rcvar`
command="/usr/local/bin/asstatd.pl"
command_interpreter="/usr/bin/perl"
load_rc_config $name
# Set defaults
: ${asstatd_enable="NO"}
: ${asstatd_pidfile="/var/run/asstatd.pid"}
: ${asstatd_netflow_port="9000"}
: ${asstatd_sflow_port="6343"}
: ${asstatd_user="root"}
start_cmd="/usr/sbin/daemon -f -u ${asstatd_user} -p ${asstatd_pidfile} ${command} -p ${asstatd_netflow_port} -P ${asstatd_sflow_port} ${asstatd_flags}"
start_postcmd="echo Starting ${name}."
pidfile=${asstatd_pidfile}
run_rc_command "$1"

View File

@ -1,29 +0,0 @@
#!/bin/sh
#
# PROVIDE: netflow-asstatd
# REQUIRE: DAEMON
# Add the following line to /etc/rc.conf to enable netflow-asstatd:
# netflow_asstatd_enable="YES"
# netflow_asstatd_flags="<set as needed>"
. /etc/rc.subr
name="netflow_asstatd"
rcvar=`set_rcvar`
command="/usr/local/bin/netflow-asstatd.pl"
command_interpreter="/usr/bin/perl"
load_rc_config $name
# Set defaults
: ${netflow_asstatd_enable="NO"}
: ${netflow_asstatd_pidfile="/var/run/netflow-asstatd.pid"}
: ${netflow_asstatd_port="6343"}
: ${netflow_asstatd_user="root"}
start_cmd="/usr/sbin/daemon -f -u ${netflow_asstatd_user} -p ${netflow_asstatd_pidfile} ${command} -p ${netflow_asstatd_port} ${netflow_asstatd_flags}"
start_postcmd="echo Starting ${name}."
pidfile=${netflow_asstatd_pidfile}
run_rc_command "$1"

View File

@ -1,29 +0,0 @@
#!/bin/sh
#
# PROVIDE: sflow-asstatd
# REQUIRE: DAEMON
# Add the following line to /etc/rc.conf to enable sflow-asstatd:
# sflow_asstatd_enable="YES"
# sflow_asstatd_flags="<set as needed>"
. /etc/rc.subr
name="sflow_asstatd"
rcvar=`set_rcvar`
command="/usr/local/bin/sflow-asstatd.pl"
command_interpreter="/usr/bin/perl"
load_rc_config $name
# Set defaults
: ${sflow_asstatd_enable="NO"}
: ${sflow_asstatd_pidfile="/var/run/sflow-asstatd.pid"}
: ${sflow_asstatd_port="6343"}
: ${sflow_asstatd_user="root"}
start_cmd="/usr/sbin/daemon -f -u ${sflow_asstatd_user} -p ${sflow_asstatd_pidfile} ${command} -p ${sflow_asstatd_port} ${sflow_asstatd_flags}"
start_postcmd="echo Starting ${name}."
pidfile=${sflow_asstatd_pidfile}
run_rc_command "$1"