summaryrefslogtreecommitdiff
path: root/user/iperf3/iperf.initd
diff options
context:
space:
mode:
authorDan Theisen <djt@hxx.in>2018-09-27 23:47:03 -0700
committerDan Theisen <djt@hxx.in>2018-09-27 23:47:03 -0700
commit1d2675b9ac0370a9bfee031a1193027b986e6833 (patch)
tree2e2e9c115161bf98fa0f5f2e68cec346541862d8 /user/iperf3/iperf.initd
parent75d34dde41545eb8df89fd9daab93b1595bc067b (diff)
downloadpackages-1d2675b9ac0370a9bfee031a1193027b986e6833.tar.gz
packages-1d2675b9ac0370a9bfee031a1193027b986e6833.tar.bz2
packages-1d2675b9ac0370a9bfee031a1193027b986e6833.tar.xz
packages-1d2675b9ac0370a9bfee031a1193027b986e6833.zip
user/iperf3: new package
Diffstat (limited to 'user/iperf3/iperf.initd')
-rw-r--r--user/iperf3/iperf.initd18
1 files changed, 18 insertions, 0 deletions
diff --git a/user/iperf3/iperf.initd b/user/iperf3/iperf.initd
new file mode 100644
index 000000000..a135bafc9
--- /dev/null
+++ b/user/iperf3/iperf.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+
+command="/usr/bin/iperf"
+pidfile="/var/run/$SVCNAME/$SVCNAME.pid"
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting $SVCNAME"
+ start-stop-daemon --start --make-pid --user ${exec_user:-nobody} \
+ --pidfile ${pidfile} --background --exec $command \
+ -- --server ${command_args}
+ eend
+}
+