Add 'etc-init.d-iperfd'

This commit is contained in:
ghostpirate 2023-05-26 18:35:32 -03:00
parent 6e60b2dd80
commit 3e130efc6e
1 changed files with 37 additions and 0 deletions

37
etc-init.d-iperfd Normal file
View File

@ -0,0 +1,37 @@
#!/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
}