Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37037597
en ru br
ALT Linux repositórios
S:2.8.0-alt2
5.0: 2.0.5-alt3.1
4.1: 2.0.5-alt3
4.0: 2.0.5-alt2
3.0: 2.0.2-alt1

Group :: Sistema/Servidores
RPM: nut

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

#!/bin/sh
#
# chkconfig: 2345 52 88
# description: The UPS information server
# processname: upsd
# config: /etc/ups/
# pidfile: /var/run/upsd/upsd.pid

WITHOUT_RC_COMPAT=1

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

# Source service configuration.
SourceIfNotEmpty /etc/sysconfig/upsd

PIDDIR=/var/lib/upsd
PIDFILE=$PIDDIR/upsd.pid
LOCKFILE=/var/lock/subsys/upsd
RETVAL=0

start()
{
msg_starting $"UPS information"
if ! service upsdrv status >/dev/null 2>&1; then
msg_not_running $"UPS driver"
failure "upsd startup"
RETVAL=$?
echo
return $RETVAL
fi
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user upsd --no-announce -- upsd $UPSD_OPTIONS
RETVAL=$?
return $RETVAL
}

stop()
{
msg_stopping $"UPS information"
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user upsd --no-announce -- upsd
RETVAL=$?
return $RETVAL
}

restart()
{
stop
start
}

reload()
{
msg_reloading $"UPS information"
stop_daemon --pidfile "$PIDFILE" --expect-user upsd -HUP -- upsd
RETVAL=$?
return $RETVAL
}

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

exit $RETVAL
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009