On Wed, Jan 22, 2020 at 11:33:21PM +0100, Jeremie Courreges-Anglas wrote: > 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
Please put rc_reload after sourcing rc.subr. See ports/infrastructure/templates/rc.template -- Antoine
