#!/bin/sh
#
# Start the printer daemon.

set -e

test -f /usr/sbin/lpd || exit 0

case "$1" in
  start)
	echo "Starting printer daemon" ; /usr/sbin/lpd
	;;
  stop)
	start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/lpd.pid --exec /usr/sbin/lpd
	;;
  *)
        echo "Usage: /etc/init.d/lpd {start|stop}"
        exit 1
esac

exit 0
