Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37491478
en ru br
Репозитории ALT
S:3.23.8-alt1
5.1: 3.11.5-alt0.M51.1
4.1: 2.8.10-alt2.M41.1
4.0: 2.7.12-alt2.M40.1
+backports:2.8.10-alt2.M40.1
3.0:
+backports:1.6.6a-alt0.M30.4.1
www.altlinux.org/Changes

Группа :: Издательство
Пакет: hplip

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

#! /bin/bash
#
# Startup/shutdown script for HPLIP
#
# Note, this script file must start before cupsd.
#
# For chkconfig the HPLIP priority (ie: 50) must be less the cupsd
# priority (ie: 55).
#
# For LSB install_initd the cups script file should have "hplip" in the
# Should-Start field.
#
# chkconfig: - 50 10
# description: HPLIP Services and Status Daemon (HPSSD) provides \
# persistent data and event services to HPLIP client applications. \
#
#
# (c) 2004 Copyright Hewlett-Packard Development Company, LP
# Adopted by Serge Volkov and Igor Vlasenko for ALT Linux Sisyphus
#
##############################################################
# removed (now is exotic configuration): Default-Start: 3 5
##############################################################
# now by default this script is not used, as hp-tools will
#
### BEGIN INIT INFO
# Provides: hplip
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start:
# Default-Stop:
# Description: HPLIP Services and Status Daemon (HPSSD) provides \
# persistent data and event services to HPLIP client applications.
### END INIT INFO

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

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

HPSSD_PIDFILE=/var/run/hpssd.pid
HPSSD_PORTFILE=/var/run/hpssd.port
HPSSD_LOCKFILE=/var/lock/subsys/hpssd
HPSSD=/usr/share/hplip/hpssd.py
#HPSSDDIR=/usr/share/hplip
PYTHON=/usr/bin/python
HPSSD_DISPLAY=hpssd.py
RETVAL=0

start()
{
start_daemon --pidfile "$HPSSD_PIDFILE" --lockfile "$HPSSD_LOCKFILE" --expect-user root -- $HPSSD
RETVAL=$?
return $RETVAL
}

stop()
{
stop_daemon --pidfile "$HPSSD_PIDFILE" --lockfile "$HPSSD_LOCKFILE" --expect-user root --displayname "$HPSSD_DISPLAY" -- $PYTHON
RETVAL=$?
[ $RETVAL -eq 0 ] && (rm -vf $HPSSD_PORTFILE)
return $RETVAL
}

restart() {
stop
start
}

debug() {
# Allow core dumps.
ulimit -c unlimited
start
}

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

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
status --pidfile "$HPSSD_PIDFILE" --expect-user root --displayname "$HPSSD_DISPLAY" -- $PYTHON
RETVAL=$?
;;
reload)
reload
;;
condstop)
[ -f "$HPSSD_LOCKFILE" ] && stop || :
;;
condrestart)
[ -f "$HPSSD_LOCKFILE" ] && restart || :
;;
condreload)
[ -f "$HPSSD_LOCKFILE" ] && reload || :
;;
debug)
debug
;;
*)
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