iperf boot launch issue

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
n8xyn
Posts: 26
Joined: Thu Apr 21, 2016 1:04 am

iperf boot launch issue

Post by n8xyn »

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
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: iperf boot launch issue

Post by johnvick »

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

John
n8xyn
Posts: 26
Joined: Thu Apr 21, 2016 1:04 am

Re: iperf boot launch issue

Post by n8xyn »

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
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: iperf boot launch issue

Post by johnvick »

I take it you have done the obvious:

# chmod 755 /etc/init.d/iperf3

and

# update-rc.d iperf3 defaults

John
n8xyn
Posts: 26
Joined: Thu Apr 21, 2016 1:04 am

Re: iperf boot launch issue

Post by n8xyn »

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...
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: iperf boot launch issue

Post by johnvick »

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
Post Reply