summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hierling <mad@cc.fh-luh.de>2006-11-02 17:39:43 +0000
committerMartin Hierling <mad@cc.fh-luh.de>2006-11-02 17:39:43 +0000
commite4172a26383dd4b2891c60a97e573e5885cfc20c (patch)
tree06a0d2bf205f7810736bf1e4b73a71aa950d511d /net-mail/dbmail/files/dbmail-timsieved.initd
parentremoving right unneeded local use flag this time (diff)
downloadsunrise-e4172a26383dd4b2891c60a97e573e5885cfc20c.tar.gz
sunrise-e4172a26383dd4b2891c60a97e573e5885cfc20c.tar.bz2
sunrise-e4172a26383dd4b2891c60a97e573e5885cfc20c.zip
net-mail/dbmail: added timsieve daemin init script
svn path=/sunrise/; revision=1738
Diffstat (limited to 'net-mail/dbmail/files/dbmail-timsieved.initd')
-rw-r--r--net-mail/dbmail/files/dbmail-timsieved.initd40
1 files changed, 40 insertions, 0 deletions
diff --git a/net-mail/dbmail/files/dbmail-timsieved.initd b/net-mail/dbmail/files/dbmail-timsieved.initd
new file mode 100644
index 000000000..3fc4e047c
--- /dev/null
+++ b/net-mail/dbmail/files/dbmail-timsieved.initd
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+#
+
+PIDFILE="/var/run/dbmail-timsieved.pid"
+
+depend() {
+ need net
+ use mysql
+ use pgsql
+ after mta
+}
+
+checkconfig() {
+ if [ ! -e "/etc/dbmail/dbmail.conf" ]; then
+ eerror "You need to create apropriate config"
+ eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist"
+ return 1
+ fi
+ # Avoid using root's TMPDIR
+ unset TMPDIR
+}
+
+
+start() {
+ checkconfig && \
+ ebegin "Starting DBMail SIEVE daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dbmail-timsieved \
+ --name dbmail-timsieved \
+ -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DBMail SIEVE daemon"
+ start-stop-daemon --stop --quiet --retry 5 \
+ --pidfile ${PIDFILE}
+ eend $?
+}
+