Add 'etc-init.d-iperfd'
This commit is contained in:
parent
6e60b2dd80
commit
3e130efc6e
37
etc-init.d-iperfd
Normal file
37
etc-init.d-iperfd
Normal 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user