Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

p910nd.sh 689B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. #
  3. # p910nd.sh This shell script takes care of starting and stopping
  4. # p910nd (port 9100+n printer daemon)
  5. # This script only controls the one on port 9101.
  6. # You can start others if you wish.
  7. #
  8. # Todo: Make it fully LSB
  9. # See how we were called.
  10. case "$1" in
  11. start)
  12. # Start daemons.
  13. echo -n "Starting p910nd: "
  14. # default port is 1 so it will appear as p9101d on a ps
  15. start_daemon p910nd
  16. echo
  17. ;;
  18. stop)
  19. # Stop daemons.
  20. echo -n "Shutting down p910nd: "
  21. killproc p9101d
  22. echo
  23. rm -f /var/run/p9101.pid
  24. ;;
  25. status)
  26. status p9101d
  27. ;;
  28. restart)
  29. $0 stop
  30. $0 start
  31. ;;
  32. *)
  33. echo "Usage: p910nd {start|stop|restart|status}"
  34. exit 1
  35. esac
  36. exit 0