Created
February 1, 2022 10:14
-
-
Save ktwrd/df83bc53e83d70ddb73bd87cce8ad327 to your computer and use it in GitHub Desktop.
iperf3 Server + SystemDService Installer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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