[packages] move packages to a new 'mail' section, cleanup
[packages.git] / mail / dovecot / files / dovecot.init
diff --git a/mail/dovecot/files/dovecot.init b/mail/dovecot/files/dovecot.init
new file mode 100644 (file)
index 0000000..338652c
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006,2007 OpenWrt.org
+
+START=99
+
+RUN_D=/var/run/dovecot
+PID_F=$RUN_D/master.pid
+
+start() {
+       mkdir -p $RUN_D
+       dovecot
+}
+
+stop() {
+       [ -f $PID_F ] && kill $(cat $PID_F)
+}