qpopper 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin /etc/init.d/qpopper
  4. #
  5. # Description : Provide Post Office Protocol (POP3) services
  6. #
  7. # Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
  8. #
  9. # Version : LFS 7.2
  10. #
  11. ########################################################################
  12. ### BEGIN INIT INFO
  13. # Provides: qpopper
  14. # Required-Start: $syslog $local_fs $network
  15. # Should-Start:
  16. # Required-Stop: $network
  17. # Should-Stop:
  18. # Default-Start: 3 4 5
  19. # Default-Stop: 0 1 2 6
  20. # Short-Description: Starts qpopper (POP3) process.
  21. # Description: Starts qpopper (POP3) process.
  22. # X-LFS-Provided-By: BLFS
  23. ### END INIT INFO
  24. . /lib/lsb/init-functions
  25. #$LastChangedBy: bdubbs $
  26. #$Date: 2012-04-18 21:23:42 -0500 (Wed, 18 Apr 2012) $
  27. CONFIG=/etc/mail/qpopper.conf
  28. QPOPPER=/usr/sbin/popper
  29. #PORT=110
  30. [ -x $QPOPPER ] || exit 0
  31. case "$1" in
  32. start)
  33. log_info_msg "Starting Qpopper daemon..."
  34. if [ ! -f $CONFIG ]; then
  35. log_failure_msg2 "$CONFIG missing!"
  36. exit 1
  37. fi
  38. start_daemon $QPOPPER $PORT -f $CONFIG
  39. evaluate_retval
  40. ;;
  41. stop)
  42. log_info_msg "Stopping Qpopper..."
  43. killproc $QPOPPER
  44. evaluate_retval
  45. ;;
  46. restart)
  47. $0 stop
  48. $0 start
  49. ;;
  50. *)
  51. echo "Usage: $0 {start|stop|restart}"
  52. exit 1
  53. ;;
  54. esac
  55. # End /etc/init.d/qpopper