Репозитории ALT
S: | 2.0.12-alt1 |
5.1: | 2.0.4-alt1 |
4.1: | 2.0.2-alt2 |
4.0: | 2.0.2-alt2 |
3.0: | 1.7.0-alt1.1 |
Группа :: Мониторинг
Пакет: iperf
Главная Изменения Спек Патчи Исходники Загрузить Gear Bugs and FR Repocop
#!/bin/sh
# iperf-tcp iperf tcp service
#
# chkconfig: - 90 10
# description: iperf service for test TCP bandwidth performance
# processname: iperf
# pidfile: /var/run/iperf-tcp.pid
# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1
# Source function library.
. /etc/init.d/functions
RUNAS=_iperf
PIDFILE=/var/run/iperf-tcp.pid
LOCKFILE=/var/lock/subsys/iperf-tcp
RETVAL=0
SourceIfNotEmpty /etc/sysconfig/iperf
start()
{
start_daemon --make-pidfile --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --user $RUNAS --displayname iperf-tcp -- iperf $TCP_ARGS
RETVAL=$?
return $RETVAL
}
stop()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root --displayname iperf-tcp -- su
RETVAL=$?
return $RETVAL
}
restart()
{
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
status --pidfile "$PIDFILE" --expect-user root --displayname iperf-tcp -- su
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|restart|condstop|condrestart|status}"
RETVAL=1
esac
exit $RETVAL