Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37620166
en ru br
ALT Linux repositórios
S:5.2.4-alt1
5.0: 4.4.1-alt1
4.1: 4.3.1-alt1
4.0: 4.1.2-alt1
3.0: 4.0.3-alt1

Group :: Sistema/Servidores
RPM: courier-imap

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

#!/bin/sh
# courier-imaps Courier IMAP-SSL daemon
#
# chkconfig: 35 71 29
# description: Courier IMAP daemon with SSL/TLS support. This \
# daemon is running via Courier own tcpd daemon - couriertcpd
# processname: courier-imaps
# config: /etc/courier-imap/imapd
# config: /etc/courier-imap/imapd-ssl
# config: /etc/courier-imap/imapd.cnf
# pidfile: /var/run/courier-imaps.pid

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

# IMAP daemon configuration
. /etc/courier-imap/imapd-ssl
. /etc/courier-imap/imapd

SBIN_DIR=/usr/sbin
LIBEXEC_DIR=/usr/lib/courier-imap

IMAPD_BIN=/usr/sbin/imapd
IMAPLOGIN_BIN=/usr/sbin/imaplogin
DAEMON=$SBIN_DIR/courier-imaps
LOGGER_BIN=$SBIN_DIR/courierlogger

LOCKFILE=/var/lock/subsys/courier-imaps

[ "$IMAPDSSLSTART" != "NO" ] || exit;
[ -x $IMAPD_BIN -a -x $IMAPLOGIN_BIN ] || exit;
[ -x $DAEMON -a -x $LOGGER_BIN ] || exit;
[ -x $COURIERTLS ] || exit;

RETVAL=0

start()
{
if test "$TLS_CACHEFILE" != ""; then
rm -f $TLS_CACHEFILE
fi

msg_starting $"Courier IMAP-SSL daemon"

ulimit -v $IMAP_ULIMITD
/usr/bin/env - /bin/sh -c " set -a ; \
prefix=/usr ;
exec_prefix=/usr ;
bindir=/usr/bin ;
libexecdir=/usr/lib/courier-imap ;
. /etc/courier-imap/imapd ; \
. /etc/courier-imap/imapd-ssl ; \
IMAP_TLS=1; export IMAP_TLS; \
$DAEMON \
-address=$SSLADDRESS \
-stderrlogger=$LOGGER_BIN \
-stderrloggername=imapd-ssl \
-maxprocs=$MAXDAEMONS \
-maxperip=$MAXPERIP \
-pid=$SSLPIDFILE -lock=$LOCKFILE \
$TCPDOPTS $SSLPORT \
$COURIERTLS -server -tcpd \
$IMAPLOGIN_BIN $IMAPD_BIN ${MAILDIRPATH}"

RETVAL=$?
if [ $RETVAL -eq 0 ]; then
success "courier-imaps startup"
else
failure "courier-imaps startup"
fi
echo
return $RETVAL
}

stop()
{
msg_stopping $"Courier IMAP-SSL daemon"
#stop_daemon --pidfile "$SSLPIDFILE" --lockfile "$LOCKLFILE" \
# --no-announce --expect-user root -- \
$DAEMON -pid=$SSLPIDFILE -lock=$LOCKFILE -stop

RETVAL=$?
if [ $RETVAL -eq 0 ]; then
success "courier-imaps shutdown"
rm -f $SSLPIDFILE
rm -f $LOCKFILE
else
failure "courier-imaps shutdown"
fi
echo
return $RETVAL
}

restart()
{
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
echo "Reload not implemented. Please, use restart instead."
;;
restart)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
status --pidfile "$SSLPIDFILE" courier-imaps
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|restart|condstop|condrestart|status}"
RETVAL=1
esac

exit $RETVAL
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009