diff options
author | Fernando J. Pereda <ferdy@gentoo.org> | 2005-01-25 18:07:46 +0000 |
---|---|---|
committer | Fernando J. Pereda <ferdy@gentoo.org> | 2005-01-25 18:07:46 +0000 |
commit | a252054c159709b0929c8b681a5a312d2de899eb (patch) | |
tree | c88fd0cc065d80641542448103c9c9239ad9a7e7 /net-mail/perdition/files | |
parent | Removing USE=crypt PDEPEND for gaim-encryption. (diff) | |
download | gentoo-2-a252054c159709b0929c8b681a5a312d2de899eb.tar.gz gentoo-2-a252054c159709b0929c8b681a5a312d2de899eb.tar.bz2 gentoo-2-a252054c159709b0929c8b681a5a312d2de899eb.zip |
New package perdition, closes #18023
(Portage version: 2.0.51-r15)
Diffstat (limited to 'net-mail/perdition/files')
-rw-r--r-- | net-mail/perdition/files/digest-perdition-1.15 | 1 | ||||
-rw-r--r-- | net-mail/perdition/files/perdition.confd | 50 | ||||
-rwxr-xr-x | net-mail/perdition/files/perdition.initd | 76 |
3 files changed, 127 insertions, 0 deletions
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 +} |