6 # chkconfig: 2345 80 20
7 # description: Startup/shutdown script for HPLIP
8 # processname: hpiod hpssd.py
11 # Source function library
12 . /etc/rc.d/init.d/functions
14 # Get service config - may override defaults
15 [ -f /etc/sysconfig/hplip ] && . /etc/sysconfig/hplip
18 # See how we were called.
21 # Check if the service is already running?
22 if [ ! -f /var/lock/subsys/hpiod ]; then
24 daemon /usr/sbin/hpiod
26 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/hpiod
28 msg_already_running hpiod
30 if [ ! -f /var/lock/subsys/hpssd ]; then
32 daemon /usr/sbin/hpssd
34 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/hpssd
36 msg_already_running hpssd
41 if [ -f /var/lock/subsys/hpiod ]; then
44 rm -f /var/lock/subsys/hpiod >/dev/null 2>&1
48 if [ -f /var/lock/subsys/hpssd ]; then
51 rm -f /var/lock/subsys/hpssd >/dev/null 2>&1
67 msg_usage "$0 {start|stop|restart|status}"