dovecot: switch to new procd init script style
authorPeter Wagner <​tripolar@gmx.at>
Thu, 26 Sep 2013 11:21:41 +0000 (11:21 +0000)
committerPeter Wagner <​tripolar@gmx.at>
Thu, 26 Sep 2013 11:21:41 +0000 (11:21 +0000)
Signed-off-by: Peter Wagner <tripolar@gmx.at>
SVN-Revision: 38206

mail/dovecot/files/dovecot.init

index 879342ab0e4268367e2320e790c235d0551335c1..7739cd15a1fec699d122899ce62db17659ab46e5 100644 (file)
@@ -1,24 +1,18 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2006-2013 OpenWrt.org
 
 START=75
 STOP=75
 
-SERVICE_PID_FILE=/var/run/dovecot/master.pid
+USE_PROCD=1
 
-start() {
+start_service() {
        user_exists dovecot 59 || user_add dovecot 59
        group_exists dovecot 59 || group_add dovecot 59
        mkdir -p -m 0755 /var/lib/dovecot
        mkdir -p -m 0755 /var/run/dovecot
        chmod 0750 /var/lib/dovecot
-       service_start /usr/sbin/dovecot
-}
-
-stop() {
-       service_stop /usr/sbin/dovecot
-}
-
-reload() {
-       service_reload /usr/sbin/dovecot
+       procd_open_instance
+       procd_set_param command /usr/sbin/dovecot -F
+       procd_close_instance
 }