Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37613591
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-pop3s Courier POP3 daemon with SSL support.
#
# chkconfig: 35 71 29
# description: Courier POP3 daemon with SSL support. This daemon
# is running via Courier own tcpd daemon - couriertcpd
# processname: courier-pop3s
# config: /etc/courier-imap/pop3d
# config: /etc/courier-imap/pop3d-ssl
# pidfile: /var/run/courier-pop3s.pid

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

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

# POP3 daemon configuration
. /etc/courier-imap/pop3d
. /etc/courier-imap/pop3d-ssl

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

POP3D_BIN=$SBIN_DIR/pop3d
POP3LOGIN_BIN=$SBIN_DIR/pop3login
DAEMON=$SBIN_DIR/courier-pop3s
LOGGER_BIN=$SBIN_DIR/courierlogger

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

[ "$POP3DSSLSTART" != "NO" ] || exit;
[ -x $POP3D_BIN -a -x $POP3LOGIN_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 POP3-SSL daemon"
/usr/bin/env - /bin/sh -c " set -a ; \
prefix=/usr ;
exec_prefix=/usr ;
bindir=/usr/bin ;
libexecdir=/usr/lib/courier-imap ;
. /etc/courier-imap/pop3d ; \
. /etc/courier-imap/pop3d-ssl ; \
POP3_TLS=1; export POP3_TLS; \
POP3_STARTTLS=NO; export POP3_STARTTLS; \
POP3_TLS_REQUIRED=0; export POP3_TLS_REQUIRED; \
$DAEMON \
-address=$SSLADDRESS \
-stderrlogger=$LOGGER_BIN \
-stderrloggername=pop3d-ssl \
-maxprocs=$MAXDAEMONS \
-maxperip=$MAXPERIP \
-pid=$SSLPIDFILE \
-lock=$LOCKFILE \
$TCPDOPTS $SSLPORT \
$COURIERTLS -server -tcpd \
$POP3LOGIN_BIN $POP3D_BIN ${MAILDIRPATH}"

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

stop()
{
msg_stopping $"Courier POP3-SSL daemon"

$DAEMON -pid=$SSLPIDFILE -lock=$LOCKFILE -stop

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

restart()
{
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
echo "Reload is 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-pop3s
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