Skip to content
Permalink
Browse files

Correction to startup scripts for sysconfdir location.

Adds check for /etc/pam.d/imap file during startup.

Submitted by:   Benoit Chesneau <bchesneau@mac.com>
Reviewed by:    rshaw@opendarwin.org

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@4220 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Robert Shaw
Robert Shaw committed Dec 15, 2003
1 parent 9c15c71 commit e1e4c6d28d613aa5b1edf289ad8fa6b38f7a914b
Showing with 25 additions and 7 deletions.
  1. +13 −4 mail/courier-imap/files/imapd-ssl.sh
  2. +12 −3 mail/courier-imap/files/imapd.sh
@@ -3,19 +3,28 @@ NAME=imapd-ssl
CAT=/bin/cat
KILL=/bin/kill

checkinstall()
{
# test if imap service is present in /etc/pam.d
if [ ! -f "__PREFIX/etc/pam.d/imap" ]; then
cp /etc/pam.d/passwd /etc/pam.d/imap
fi
}

case "$1" in

start)
checkinstall
echo "starting courier-imap - imapd-ssl"
source __PREFIX/etc/courier/imapd
source __PREFIX/etc/courier/imapd-ssl
source __PREFIX/etc/courier-imap/imapd
source __PREFIX/etc/courier-imap/imapd-ssl
__PREFIX/libexec/imapd-ssl.rc start
;;

stop)
echo "stopping courier-imap - imapd-ssl"
source __PREFIX/etc/courier/imapd
source __PREFIX/etc/courier/imapd-ssl
source __PREFIX/etc/courier-imap/imapd
source __PREFIX/etc/courier-imap/imapd-ssl
__PREFIX/libexec/imapd-ssl.rc stop
;;

@@ -3,18 +3,27 @@ NAME=imapd
CAT=/bin/cat
KILL=/bin/kill

checkinstall()
{
# test if imap service is present in /etc/pam.d
if [ ! -f "__PREFIX/etc/pam.d/imap" ]; then
cp /etc/pam.d/passwd /etc/pam.d/imap
fi
}


case "$1" in

start)

checkinstall
echo "starting courier-imap - imapd"
source __PREFIX/etc/courier/imapd
source __PREFIX/etc/courier-imap/imapd
__PREFIX/libexec/imapd.rc start
;;

stop)
echo "stopping courier-imap - imapd"
source __PREFIX/etc/courier/imapd
source __PREFIX/etc/courier-imap/imapd
__PREFIX/libexec/imapd.rc stop
;;

0 comments on commit e1e4c6d

Please sign in to comment.
You can’t perform that action at this time.