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

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

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

# Courier POP3-daemon configs
. /etc/courier-imap/pop3d-ssl
. /etc/courier-imap/pop3d

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

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

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

[ "$POP3DSTART" != "NO" ] || exit;
[ -x $POP3D_BIN -a -x $POP3LOGIN_BIN ] || exit;
[ -x $DAEMON -a -x $LOGGER_BIN ] || exit;

RETVAL=0

start()
{
msg_starting $"Courier POP3 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 ; \
TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL ; export TLS_PROTOCOL ; \
$DAEMON \
-address=$ADDRESS \
-stderrlogger=$LOGGER_BIN \
-stderrloggername=pop3d \
-maxprocs=$MAXDAEMONS \
-maxperip=$MAXPERIP \
-pid=$PIDFILE \
-lock=$LOCKFILE \
$TCPDOPTS $PORT \
$POP3LOGIN_BIN $POP3D_BIN ${MAILDIRPATH}"

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

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

RETVAL=$?
if [ $RETVAL -eq 0 ]; then
success "courier-pop3d shutdown"
rm -f $PIDFILE
rm -f $LOCKFILE
else
failure "courier-pop3d 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 "$PIDFILE" courier-pop3d
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