On Wed, Jan 22 2020, Klemens Nanni <[email protected]> wrote:
> On Wed, Jan 22, 2020 at 09:39:16PM +0100, Alexander Bluhm wrote:
>> For my performance tests it would be convenient to start an iperf3
>> server as daemon automatically. Can we add an rc script?
> Seems reasonable.
>
>> Index: net/iperf3/pkg/iperf3.rc
>> ===================================================================
>> RCS file: net/iperf3/pkg/iperf3.rc
>> diff -N net/iperf3/pkg/iperf3.rc
>> --- /dev/null 1 Jan 1970 00:00:00 -0000
>> +++ net/iperf3/pkg/iperf3.rc 22 Jan 2020 20:18:43 -0000
>> @@ -0,0 +1,12 @@
>> +#!/bin/ksh
>> +#
>> +# $OpenBSD$
>> +
>> +daemon="${TRUEPREFIX}/bin/iperf3"
>> +daemon_flags="-s -D"
> I think at least `-D' should be part of `$daemon', otherwise setting
> flags only causes trouble.
+1, same for -s
> One might argue that `-s' for server mode belongs there as well, no?
> Or to put it this way: does it make sense to specify `-c' for client
> in flags? Would one want to run a client service as well perhaps?
I think that's covered by -R.
ok jca@ with daemon="${TRUEPREFIX}/bin/iperf3 -s -D"
>> +daemon_user="_iperf3"
>> +rc_reload=NO
>> +
>> +. /etc/rc.d/rc.subr
>> +
>> +rc_cmd $1
>>
>
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE