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


