ALT Linux repos
S: | 2.4.7-alt1 |
5.0: | 1.3.10-alt1 |
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 |
Group :: System/Servers
RPM: cups
Main Changelog Spec Patches Sources Download 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
### BEGIN INIT INFO
# Provides: cups
# Required-Start: $syslog $local_fs
# Required-Stop: $syslog $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: The CUPS server daemon
# Description: The CUPS server daemon
### END INIT INFO
WITHOUT_RC_COMPAT=1
# source function library
. /etc/init.d/functions
PIDFILE=/var/run/cups/cupsd.pid
LOCKFILE=/var/lock/subsys/cups
RETVAL=0
start()
{
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