From a252054c159709b0929c8b681a5a312d2de899eb Mon Sep 17 00:00:00 2001 From: "Fernando J. Pereda" Date: Tue, 25 Jan 2005 18:07:46 +0000 Subject: New package perdition, closes #18023 (Portage version: 2.0.51-r15) --- net-mail/perdition/files/digest-perdition-1.15 | 1 + net-mail/perdition/files/perdition.confd | 50 +++++++++++++++++ net-mail/perdition/files/perdition.initd | 76 ++++++++++++++++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 net-mail/perdition/files/digest-perdition-1.15 create mode 100644 net-mail/perdition/files/perdition.confd create mode 100755 net-mail/perdition/files/perdition.initd (limited to 'net-mail/perdition/files') diff --git a/net-mail/perdition/files/digest-perdition-1.15 b/net-mail/perdition/files/digest-perdition-1.15 new file mode 100644 index 000000000000..799264e9f127 --- /dev/null +++ b/net-mail/perdition/files/digest-perdition-1.15 @@ -0,0 +1 @@ +MD5 7c3aaf30198cf73191a984a76637a940 perdition-1.15.tar.gz 551692 diff --git a/net-mail/perdition/files/perdition.confd b/net-mail/perdition/files/perdition.confd new file mode 100644 index 000000000000..7b147286eb2a --- /dev/null +++ b/net-mail/perdition/files/perdition.confd @@ -0,0 +1,50 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/perdition/files/perdition.confd,v 1.1 2005/01/25 18:07:46 ferdy Exp $ + +# Run time configuration parameters for /etc/init.d/perdition + +# User to run perdition as +# ( change it only if you know what you're doing ) +PERDITION_USER=perdition + +# Where pid files will be stored +PIDDIR=/var/run/perdition + +# Command line parameters to pass to perdition when run in any mode. +# This is in addition to any mode specific flags. +# That is, it is in addtion to any command line options supplied +# by POP3_FLAGS, POP3S_FLAGS, IMAP4_FLAGS or IMAP4S_FLAGS +FLAGS="-f /etc/perdition/perdition.conf" + +# Run an instance of perdition in POP3 mode +# Set to "yes" to run this instance of perdition +# Set to any other valye to not run this instance of perdition +POP3=yes + +#Command line parameters to pass to perdition when run in POP3 mode +POP3_FLAGS= + +# Run an instance of perdition in POP3S mode +# Set to "yes" to run this instance of perdition +# Set to any other valye to not run this instance of perdition +POP3S=no + +#Command line parameters to pass to perdition when run in POP3S mode +POP3S_FLAGS= + +# Run an instance of perdition in IMAP4 mode +# Set to "yes" to run this instance of perdition +# Set to any other valye to not run this instance of perdition +IMAP4=yes + +#Command line parameters to pass to perdition when run in IMAP4 mode +IMAP4_FLAGS= + +# Run an instance of perdition in IMAP4S mode +# Set to "yes" to run this instance of perdition +# Set to any other valye to not run this instance of perdition +IMAP4S=no + +#Command line parameters to pass to perdition when run in IMAP4S mode +IMAP4S_FLAGS= diff --git a/net-mail/perdition/files/perdition.initd b/net-mail/perdition/files/perdition.initd new file mode 100755 index 000000000000..14ca8b8d792a --- /dev/null +++ b/net-mail/perdition/files/perdition.initd @@ -0,0 +1,76 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/perdition/files/perdition.initd,v 1.1 2005/01/25 18:07:46 ferdy Exp $ + +depend() { + need net +} + + +check_key() { + if [ ! -e /etc/perdition/perdition.crt.pem ] ; then + einfo "No SSL keys; see man perdition to create them. Or run: " + einfo "$ openssl req -new -x509 -nodes -out /etc/perdition/perdition.crt.pem -keyout /etc/perdition/perdition.key.pem -days 365" + return 1 + fi +} + +start() { + if [ "${POP3}" = "yes" ]; then + ebegin "Starting peridtion services (POP3)" + start-stop-daemon --quiet --start --startas /usr/sbin/perdition.pop3 -p ${PIDDIR}/pop3.pid \ + -- ${FLAGS} ${POP3_FLAGS} -u ${PERDITION_USER} --pid_file ${PIDDIR}/pop3.pid + eend $? + fi + + if [ "${POP3S}" = "yes" ]; then + check_key || return 1 + ebegin "Starting perdition services (POP3S)" + start-stop-daemon --quiet --start --startas /usr/sbin/perdition.pop3s -p ${PIDDIR}/pop3s.pid \ + -- ${FLAGS} ${POP3S_FLAGS} -u ${PERDITION_USER} --pid_file ${PIDDIR}/pop3s.pid + eend $? + fi + + if [ "${IMAP4}" = "yes" ]; then + ebegin "Starting perdition services (IMAP4)" + start-stop-daemon --quiet --start --startas /usr/sbin/perdition.imap4 -p ${PIDDIR}/imap4.pid \ + -- ${FLAGS} ${IMAP4_FLAGS} -u ${PERDITION_USER} --pid_file ${PIDDIR}/imap4.pid + eend $? + fi + + if [ "${IMAP4S}" = "yes" ]; then + check_key || return 1 + ebegin "Starting perdition services (IMAP4S)" + start-stop-daemon --quiet --start --startas /usr/sbin/perdition.imap4s -p ${PIDDIR}/imap4s.pid \ + -- ${FLAGS} ${IMAP4S_FLAGS} -u ${PERDITION_USER} --pid_file ${PIDDIR}/imap4s.pid + eend $? + fi +} + + +stop() { + if [ "${POP3}" = "yes" ]; then + ebegin "Shutting down perdition services (POP3)" + start-stop-daemon -o --quiet --stop --pidfile ${PIDDIR}/pop3.pid + eend $? + fi + + if [ "${POP3S}" = "yes" ]; then + ebegin "Shutting down perdition services (POP3S)" + start-stop-daemon -o --quiet --stop --pidfile ${PIDDIR}/pop3s.pid + eend $? + fi + + if [ "${IMAP4}" = "yes" ]; then + ebegin "Shutting down perdition services (IMAP4)" + start-stop-daemon -o --quiet --stop --pidfile ${PIDDIR}/imap4.pid + eend $? + fi + + if [ "${IMAP4S}" = "yes" ]; then + ebegin "Shutting down perdition services (IMAP4S)" + start-stop-daemon -o --quiet --stop --pidfile ${PIDDIR}/imaps.pid + eend $? + fi +} -- cgit v1.2.3-65-gdbad