iperf boot launch issue

I’m trying really hard to get iperf to launch at boot on my Z83-II. I’ve tried 3 different tutorials and have yet to have it work. Is there something in the structure of Dietpi I’m unaware of? 2 of the tutorials were pretty much the same and one had my put the startup script in /etc/intit instead of /etc/init.d

Can you post a bit more info on what you’ve tried and your startup script?

John

Hi John, first I tried this in the /etc/init.d dierctory under the name “iperf3”

#!/bin/bash
/usr/bin/iperf3 -s &

I also tried this more complex script under the /etc/init directory under the name iperf3.conf

description “Iperf 3 Upstart Script”
author “Author”

start on filesystem or runlevel [2345]
stop on shutdown
expect fork

script

exec /usr/bin/iperf3 -s -D
echo $$ > /var/run/iperf3.pid

end script

pre-start script
echo “[date] Iperf 3 Server Starting” >> /var/log/iperf3.log
end script

pre-stop script
rm /var/run/iperf3.pid
echo “[date] Iperf 3 Server Stopping” >> /var/log/iperf3.log
end script

iperf3 runs perfectly if I launch it manually with

iperf3 -s

I take it you have done the obvious:

chmod 755 /etc/init.d/iperf3

and

update-rc.d iperf3 defaults

John

I did but being unsure I did it again and still will not start at boot… not a big issue since I can manually start it…

Just a thought on this could it be that the script is running before the network is up?

Have you thought of trying to start it using a Systemd script?

https://gist.github.com/mmasaki/3147f23fca698da9ff79

John