aboutsummaryrefslogtreecommitdiffstats
path: root/main/perdition/perdition.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-02-23 09:35:03 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-02-23 09:49:39 +0000
commite3bf283ffc053f865f7d2bf607e5b518782fafb2 (patch)
tree2b2a0a0d8c69443ed8cff6386fd364459d7cb7af /main/perdition/perdition.initd
parent52b1fb5af93e3781ff3a719e034fbe15e28162c5 (diff)
downloadaports-e3bf283ffc053f865f7d2bf607e5b518782fafb2.tar.bz2
aports-e3bf283ffc053f865f7d2bf607e5b518782fafb2.tar.xz
main/perdition: rebuild against gdbm-1.10 and create user properly
Diffstat (limited to 'main/perdition/perdition.initd')
-rwxr-xr-x[-rw-r--r--]main/perdition/perdition.initd15
1 files changed, 12 insertions, 3 deletions
diff --git a/main/perdition/perdition.initd b/main/perdition/perdition.initd
index 0242169c4b..397ed47751 100644..100755
--- a/main/perdition/perdition.initd
+++ b/main/perdition/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 \
@@ -70,7 +79,7 @@ stop() {
if [ "${IMAP4S}" = "yes" ]; then
ebegin "Shutting down perdition services (IMAP4S)"
- start-stop-daemon -o --quiet --stop --pidfile ${PIDDIR}/imap4s.pid
+ start-stop-daemon -o --quiet --stop --pidfile ${PIDDIR}/imaps.pid
eend $?
fi
}