Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37914891
en ru br
Репозитории ALT
5.1: 0.8-alt1
4.1: 0.8-alt1
4.0: 0.8-alt1
www.altlinux.org/Changes

Группа :: Мониторинг
Пакет: ipband

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# ipband This shell script takes care of starting and stopping ipband.
#
# chkconfig: - 85 15
# description: IP Bandwidth Watchdog
# processname: ipband
# config: /etc/ipband.conf
# pidfile: /var/run/ipband.pid

NAME=ipband

[ -f /etc/$NAME.conf ] || exit 0

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

PIDFILE=/var/run/$NAME.pid
LOCKFILE=/var/lock/subsys/$NAME
RETVAL=0
SERVICE_ARGS="--pidfile $PIDFILE --lockfile $LOCKFILE --expect-user root"

start() {
start_daemon $SERVICE_ARGS --make-pidfile "$PIDFILE" -- $NAME
RETVAL=$?
return $RETVAL
}

stop() {
stop_daemon $SERVICE_ARGS -- $NAME
RETVAL=$?
return $RETVAL
}

restart() {
stop
start
}

mystatus() {
status $SERVICE_ARGS -- $NAME
RETVAL=$?
return $RETVAL
}

function ipband_main()
{
case "$1" in
start) start ;;
stop) stop ;;
reload) restart ;;
restart) restart ;;
status) mystatus ;;
condstop) [ -e "$LOCKFILE" ] && stop ;;
condrestart) [ -e "$LOCKFILE" ] && restart ;;
condreload) [ -e "$LOCKFILE" ] && restart ;;
*) msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac

return $RETVAL
}

ipband_main "$@"

## EOF ##
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin