cupsd.init 477 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. #FWINIT 60
  3. . /etc/rc.conf
  4. case $1 in
  5. autostop) ;;
  6. autostart)
  7. test x"${cups:-NO}" = x"NO" && exit 0
  8. exec sh $0 start
  9. ;;
  10. start)
  11. [ -d /var/cache/cups ] || mkdir -p /var/cache/cups
  12. [ -d /var/cups ] || mkdir -p /var/cups/tmp
  13. [ -d /var/cups/spool/cups/tmp ] || mkdir -p /var/cups/spool/cups/tmp
  14. /usr/sbin/cupsd -c /etc/cups/cupsd.conf
  15. ;;
  16. stop)
  17. killall cupsd
  18. ;;
  19. restart)
  20. sh $0 stop
  21. sh $0 start
  22. ;;
  23. *)
  24. echo "Usage: $0 {start | stop | restart}"
  25. ;;
  26. esac
  27. exit $?