courier-imap-4.0.6-r1-courier-imapd.rc6 796 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2017 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. depend() {
  5. need net courier-authlib
  6. use famd
  7. }
  8. . /etc/courier-imap/imapd
  9. checkconfig() {
  10. if [ ! -e /etc/courier-imap/imapd ] ; then
  11. eerror "You need an /etc/courier-imap/imapd file to run courier-imapd"
  12. return 1
  13. fi
  14. . /etc/courier-imap/imapd || {
  15. eerror "There are syntax errors in /etc/courier-imap/imapd"
  16. eerror "Please correct them before trying to start courier-imapd"
  17. return 2
  18. }
  19. }
  20. start() {
  21. checkconfig || return 1
  22. ebegin "Starting courier-imapd"
  23. /usr/bin/env - /usr/GENTOO_LIBDIR/courier-imap/gentoo-imapd.rc --pid=${PIDFILE}
  24. eend $?
  25. }
  26. stop() {
  27. ebegin "Stopping courier-imapd"
  28. start-stop-daemon --quiet --stop --pid=${PIDFILE}
  29. eend $?
  30. }