diff options
Diffstat (limited to 'net-mail/perdition/files/perdition.initd')
-rwxr-xr-x | net-mail/perdition/files/perdition.initd | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net-mail/perdition/files/perdition.initd b/net-mail/perdition/files/perdition.initd index cb7f680d5ae7..397ed4775156 100755 --- a/net-mail/perdition/files/perdition.initd +++ b/net-mail/perdition/files/perdition.initd @@ -1,7 +1,7 @@ #!/sbin/runscript -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2011 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.2 2008/06/10 18:28:27 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/perdition/files/perdition.initd,v 1.3 2011/06/15 15:24:06 eras Exp $ depend() { need net @@ -16,7 +16,16 @@ check_key() { fi } +checkconfig() { + # create PIDDIR (usually /var/run/perdition) if necessary + if [ ! -d "${PIDDIR:-/var/run/perdition}" ] ; then + checkpath -q -d -o ${PERDITION_USER:-perdition}:${PERDITION_USER:-perdition} \ + -m 0775 "${PIDDIR:-/var/run/perdition}" || return 1 + fi +} + start() { + checkconfig || return 1 if [ "${POP3}" = "yes" ]; then ebegin "Starting perdition services (POP3)" start-stop-daemon --quiet --start --startas /usr/sbin/perdition.pop3 -p ${PIDDIR}/pop3.pid \ |