iperf3/etc-init.d-iperfd

37 lines
700 B
Bash

#!/bin/sh /etc/rc.common
# (C) 2019 - 2023 Fernao Vellozo
# This is free software under the terms of GPLv3
START=90
EXTRA_COMMANDS="status"
EXTRA_HELP=" status Check service status"
boot() {
/usr/bin/iperfd
logger ".. iperf3 daemon started on boot .."
}
start() {
/usr/bin/iperfd
logger ".. iperf3 daemon started .."
}
restart() {
logger ".. iperf3 daemon restarting .."
killall iperf3
/usr/bin/iperfd
logger ".. iperf3 daemon restarted .."
}
stop() {
killall iperf3
logger ".. iperf3 daemon stopped .."
}
status() {
ps | grep iperf3 | grep -v grep > /dev/null 2>&1
if [ $? = 0 ];
then echo ".. iperf3 daemon is running .."
else echo ".. iperf3 daemon is NOT running .."
fi
}