Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37858315
en ru br
Репозитории ALT
S:2.4.7-alt1
5.1: 1.4.2-alt1.M51.2
4.1: 1.3.10-alt0.M41.4
+updates:1.3.9-alt1.M41.1
4.0: 1.2.12-alt6.M40.9
+updates:1.2.12-alt6.M40.8
3.0: 1.1.20-alt14.1
www.altlinux.org/Changes

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

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

#!/bin/sh

# Init file for the CUPS server daemon
#
# chkconfig: 2345 60 40
# description: The Common UNIX Printing System (CUPS), an \
# advanced printer spooling system which \
# allows setting of printer options and \
# automatic availability of a printer \
# configured on one server in the whole \
# network. Default printing system of Linux \
# Mandrake.
#
# processname: cupsd
# config: /etc/cups/cupsd.conf
# config: /etc/cups/client.conf
# config: /etc/cups/classes.conf
# config: /etc/cups/printers.conf
# config: /etc/cups/mime.types
# config: /etc/cups/mime.convs
# config: /etc/cups/ppds.dat

WITHOUT_RC_COMPAT=1

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

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

[ -f /sbin/ifconfig ] || exit

prepare_loopback()
{
if !(/sbin/ifconfig | /bin/egrep "^lo +[^ ]+.*Loopback" > /dev/null 2>&1); then
echo "Loopback device (\"lo\", 127.0.0.1) needed by CUPS, starting it ..."
/sbin/ifconfig lo 127.0.0.1 > /dev/null 2>&1
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
echo
echo -n "Cannot start loopback device, start of CUPS aborted"
fi
fi
}

start()
{
prepare_loopback

msg_starting $"CUPS"
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --no-announce -- cupsd
RETVAL=$?
unset LD_PRELOAD
return $RETVAL
}


stop()
{
msg_stopping $"CUPS"
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --no-announce -- cupsd
RETVAL=$?
return $RETVAL
}

restart()
{
stop
start
}


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


case "$1" in
start)
start
;;
stop)
stop
;;
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 cupsd
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