aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.rc6')
-rw-r--r--net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.rc636
1 files changed, 36 insertions, 0 deletions
diff --git a/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.rc6 b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.rc6
new file mode 100644
index 0000000..8d78d9a
--- /dev/null
+++ b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.rc6
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net courier-authlib
+ use famd
+}
+
+source /etc/courier-imap/imapd
+
+checkconfig() {
+ if [[ ! -e /etc/courier-imap/imapd ]] ; then
+ eerror "You need an /etc/courier-imap/imapd file to run courier-imapd"
+ return 1
+ fi
+ source /etc/courier-imap/imapd || {
+ eerror "There are syntax errors in /etc/courier-imap/imapd"
+ eerror "Please correct them before trying to start courier-imapd"
+ return 2
+ }
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting courier-imapd"
+ /usr/bin/env - /usr/GENTOO_LIBDIR/courier-imap/gentoo-imapd.rc --pid=${PIDFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping courier-imapd"
+ start-stop-daemon --quiet --stop --pid=${PIDFILE}
+ eend $?
+}