Skip to content

Instantly share code, notes, and snippets.

@ktwrd
Created February 1, 2022 10:14
Show Gist options
  • Select an option

  • Save ktwrd/df83bc53e83d70ddb73bd87cce8ad327 to your computer and use it in GitHub Desktop.

Select an option

Save ktwrd/df83bc53e83d70ddb73bd87cce8ad327 to your computer and use it in GitHub Desktop.
iperf3 Server + SystemDService Installer
#!/usr/bin/sudo /bin/bash
apt update
apt install -y iperf3
echo $(cat << EOF
[Unit]
Description=iperf3 Server
After=network.target
[Service]
Type=simple
Restart=always
RestartSec=1
User=root
ExecStart=/usr/bin/iperf3 -s
EOF) > /etc/systemd/system/iperf3.service
systemctl daemon-reload
systemctl enable --now iperf3
echo "iperf3 Server should be installed alongside with it's systemd service under the name 'iperf3'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment