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

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

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

#! /bin/sh
#
# smartd Start/Stop the smartd daemon.
#
# chkconfig: 2345 40 60
# description: Self Monitoring and Reporting Technology (S.M.A.R.T.) Daemon \
# monitors the reliability of ATA and SCSI hard drives.
# processname: smartd
# config: /etc/smartd.conf
# pidfile: /var/run/smartd.pid

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

# Get config.
SourceIfNotEmpty /etc/sysconfig/smartd

SMARTD=/usr/sbin/smartd
LOCKFILE=/var/lock/subsys/smartd
PIDFILE=/var/run/smartd.pid
RETVAL=0

start()
{
echo -n "Starting smartd: "
daemon $SMARTD "-p $PIDFILE $EXTRAOPTIONS"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch "$LOCKFILE"
return $RETVAL
}

stop()
{
echo -n "Stopping smartd: "
killproc smartd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f "$LOCKFILE"
return $RETVAL
}

restart()
{
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
status smartd
RETVAL=$?
;;
*)
echo "Usage: ${0##*/} {start|stop|restart|reload|condstop|condrestart|status}"
RETVAL=1
esac

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