Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37515127
en ru br
Репозитории ALT
S:5.33.0-alt1
5.1: 5.2.5-alt0.M51.1
4.1: 5.0-alt0.1
4.0: 5.2.5-alt0.M40.1
3.0: 4.1.1-alt1.1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: monit

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

#! /bin/sh
#
# $Id: monit.init,v 1.4 2003/01/09 08:01:09 homyakov Exp $
#
# monit Monitors processes and restarts them if they exit
#
# chkconfig: 345 98 02
# description: monit is a simple daemon process to restart processes if \
# they die. It can also check tcp and udp ports to make sure \
# that they are responding.
# processname: monit
# pidfile: /var/run/monit.pid
# config: /etc/monitrc
# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

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

# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/network

# Source config.
SourceIfNotEmpty /etc/sysconfig/monit

[ -r /etc/monitrc ] || exit

PIDFILE=/var/run/monit.pid
LOCKFILE=/var/lock/subsys/monit
RETVAL=0

start ()
{
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- monit $MONIT_OPTIONS
RETVAL=$?
return $RETVAL

}

stop ()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- monit
RETVAL=$?
return $RETVAL
}

status ()
{
monit status
RETVAL=$?
return $RETVAL
}

restart ()
{
stop
start
}

reload ()
{
msg_reloading monit
stop_daemon --pidfile "$PIDFILE" --expect-user root -HUP -- monit
RETVAL=$?
return $RETVAL
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart)
restart
;;
reload)
reload
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
condreload)
if [ -e "$LOCKFILE" ]; then
reload
fi
;;
status)
status --pidfile "$PIDFILE" --expect-user root -- monit
# monit status
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1

esac

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