sendmail 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin sendmail
  4. #
  5. # Description : Starts Sendmail Mail Trasfer Agent
  6. #
  7. # Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
  8. #
  9. # Version : LFS 7.2
  10. #
  11. ########################################################################
  12. ### BEGIN INIT INFO
  13. # Provides: sendmail
  14. # Required-Start: $syslog $local_fs $network
  15. # Should-Start: $remote_fs openldap mysql postgresql saslauthd
  16. # Required-Stop: $network
  17. # Should-Stop: $remote_fs openldap mysql postgresql saslauthd
  18. # Default-Start: 3 4 5
  19. # Default-Stop: 0 1 2 6
  20. # Short-Description: Sendmail MTA
  21. # Description: Controls the Sendmail Mail Transfer Agent
  22. # X-LFS-Provided-By: BLFS / LFS 7.2
  23. ### END INIT INFO
  24. . /lib/lsb/init-functions
  25. case "$1" in
  26. start)
  27. log_info_msg "Starting sendmail..."
  28. start_daemon /usr/sbin/sendmail -bs -bd -q5m start
  29. evaluate_retval
  30. ;;
  31. stop)
  32. log_info_msg "Stopping Sendmail..."
  33. killproc /usr/sbin/sendmail
  34. evaluate_retval
  35. ;;
  36. status)
  37. statusproc /usr/sbin/sendmail
  38. ;;
  39. restart)
  40. $0 stop
  41. sleep 1
  42. $0 start
  43. ;;
  44. *)
  45. echo "Usage: $0 {start|stop|status|restart}"
  46. exit 1
  47. ;;
  48. esac
  49. # End /etc/init.d/sendmail