source:
hybrid/branches/releng-10/nanobsd/files/etc/rc.d/iperf
Last change on this file was 12922, checked in by , 10 years ago | |
---|---|
|
|
File size: 622 bytes |
Rev | Line | |
---|---|---|
[10422] | 1 | #!/bin/sh |
2 | # | |
[12334] | 3 | # PROVIDE: iperf |
4 | # BEFORE: DAEMON | |
[10422] | 5 | # KEYWORD: shutdown |
6 | # | |
[12334] | 7 | # Add the following line to /etc/rc.conf to enable iperf in server mode: |
[10422] | 8 | # |
[12334] | 9 | # iperf_enable="YES" |
[10422] | 10 | # |
[12334] | 11 | . /etc/rc.subr |
[10422] | 12 | |
[12334] | 13 | name=iperf |
[10422] | 14 | |
[12334] | 15 | #command=/usr/local/bin/iperf |
16 | #command_args="-s -D" | |
[10422] | 17 | |
[12334] | 18 | load_rc_config ${name} |
[10422] | 19 | |
[12334] | 20 | iperf_enable=${iperf_enable-"NO"} |
[10422] | 21 | |
[12334] | 22 | #### |
23 | # iperf does not generate a pid file | |
24 | # iperf_pidfile=${iperf_pidfile-"/var/run/.pid"} | |
25 | # pidfile="${iperf_pidfile}" | |
[10422] | 26 | |
[12334] | 27 | # Quick to start iperf in deamon mode and make sure logfiles get writting in |
28 | # parseable way | |
29 | start_cmd="sh -c 'iperf -s -D -y c 1>>/var/log/iperf.log 2>>/var/log/iperf.log'" | |
[10422] | 30 | |
31 | run_rc_command "$1" |
Note:
See TracBrowser
for help on using the repository browser.