courier-imap-4.0.6-r1-courier-pop3d.rc6 804 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/pop3d
  9. checkconfig() {
  10. if [ ! -e /etc/courier-imap/pop3d ] ; then
  11. eerror "You need an /etc/courier-imap/pop3d file to run courier-pop3d"
  12. return 1
  13. fi
  14. . /etc/courier-imap/pop3d || {
  15. eerror "There are syntax errors in /etc/courier-imap/pop3d"
  16. eerror "Please correct them before trying to start courier-pop3d"
  17. return 2
  18. }
  19. }
  20. start() {
  21. checkconfig || return 1
  22. ebegin "Starting courier-pop3d"
  23. /usr/bin/env - /usr/GENTOO_LIBDIR/courier-imap/gentoo-pop3d.rc --pidfile ${PIDFILE}
  24. eend $?
  25. }
  26. stop() {
  27. ebegin "Stopping courier-pop3d"
  28. start-stop-daemon --quiet --stop --pidfile ${PIDFILE}
  29. eend $?
  30. }