summaryrefslogtreecommitdiff
path: root/user/iperf3/iperf.initd
diff options
context:
space:
mode:
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
+}
+