68 lines
1.4 KiB
Bash
68 lines
1.4 KiB
Bash
#!/bin/sh
|
|
########################################################################
|
|
# Begin lprng
|
|
#
|
|
# Description : Start lpd daemon
|
|
#
|
|
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
|
|
#
|
|
# Version : LFS 7.0
|
|
#
|
|
########################################################################
|
|
|
|
### BEGIN INIT INFO
|
|
# Provides: lprng
|
|
# Required-Start: $local_fs
|
|
# Should-Start: $remote_fs
|
|
# Required-Stop: $local_fs
|
|
# Should-Stop: $remote_fs
|
|
# Default-Start: 3 4 5
|
|
# Default-Stop: 0 1 2 6
|
|
# Short-Description: Starts lpd daemon.
|
|
# Description: Starts an implementation of the Berkeley LPR print
|
|
# spooler functionality.
|
|
# X-LFS-Provided-By: LFS
|
|
### END INIT INFO
|
|
|
|
. /lib/lsb/init-functions
|
|
|
|
#$LastChangedBy: bdubbs $
|
|
#$Date: 2011-12-05 20:37:16 -0600 (Mon, 05 Dec 2011) $
|
|
|
|
case "$1" in
|
|
start)
|
|
log_info_msg "Starting lpd..."
|
|
start_daemon /usr/sbin/lpd
|
|
evaluate_retval
|
|
;;
|
|
|
|
stop)
|
|
log_info_msg "Stopping lpd..."
|
|
killproc /usr/sbin/lpd
|
|
evaluate_retval
|
|
;;
|
|
|
|
reload)
|
|
boot_mesg "Reloading lpd..."
|
|
killproc /usr/sbin/lpd -HUP
|
|
evaluate_retval
|
|
;;
|
|
|
|
restart)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
|
|
status)
|
|
statusproc /usr/sbin/lpd
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: $0 {start|stop|reload|restart|status}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# End /etc/init.d/lprng
|