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.
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?
> +daemon_user="_iperf3"
> +rc_reload=NO
> +
> +. /etc/rc.d/rc.subr
> +
> +rc_cmd $1
>