2 # Copyright 1999-2017 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
6 need net courier-authlib
10 . /etc/courier-imap/imapd-ssl
13 if [ ! -e /etc/courier-imap/imapd-ssl ] ; then
14 eerror "You need an /etc/courier-imap/imapd-ssl file to run courier-imapd-ssl"
17 . /etc/courier-imap/imapd-ssl || {
18 eerror "There are syntax errors in /etc/courier-imap/imapd-ssl"
19 eerror "Please correct them before trying to start courier-imapd-ssl"
22 if [ ! -e "${TLS_CERTFILE}" ] ; then
23 eerror "You need to create a SSL certificate to use IMAP over SSL"
24 eerror "Edit /etc/courier-imap/imapd.cnf, then run: mkimapdcert"
30 checkconfig || return 1
31 ebegin "Starting courier-imapd over SSL"
32 /usr/bin/env - /usr/GENTOO_LIBDIR/courier-imap/gentoo-imapd-ssl.rc --pid=${SSLPIDFILE}
37 ebegin "Stopping courier-imapd over SSL"
38 start-stop-daemon --quiet --stop --pid=${SSLPIDFILE}