Magellan Linux

Annotation of /trunk/dovecot/dovecot.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 373 - (hide annotations) (download)
Mon Oct 15 22:16:26 2007 UTC (17 years ago) by niro
File size: 1117 byte(s)
-dovecot initscript

1 niro 373 #!/bin/bash
2     # $Header: /root/magellan-cvs/src/dovecot/dovecot.rc,v 1.1 2007-10-15 22:16:26 niro Exp $
3    
4     #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k
5     #%start: 70
6     #%stop: 80
7    
8     #deps
9     #%needs:
10     #%before:
11     #%after:
12    
13     source /etc/sysconfig/rc
14     source $rc_functions
15    
16     case "$1" in
17     start)
18     echo -e ${COLOREDSTAR}"Starting dovecot ..."
19     start-stop-daemon --start --exec /usr/sbin/dovecot \
20     --pidfile /var/run/dovecot/master.pid
21     evaluate_retval
22    
23     update_svcstatus $1
24     splash svc_started "$(basename $0)" 0
25     ;;
26    
27     stop)
28     echo -e ${COLOREDSTAR}"Stopping dovecot ..."
29     start-stop-daemon --stop --exec /usr/sbin/dovecot \
30     --pidfile /var/run/dovecot/master.pid
31     evaluate_retval
32    
33     update_svcstatus $1
34     splash svc_stopped "$(basename $0)" 0
35     ;;
36    
37     reload)
38     echo -e ${COLOREDSTAR}"Reloading dovecot configuration ..."
39     start-stop-daemon --stop --oknodo --exec /usr/sbin/dovecot \
40     --pidfile /var/run/dovecot/master.pid --signal HUP
41     evaluate_retval
42     ;;
43    
44     restart)
45     $0 stop
46     sleep 1
47     $0 start
48     ;;
49    
50     status)
51     statusproc /usr/sbin/dovecot
52     ;;
53    
54     *)
55     echo "Usage: $0 {start|stop|reload|restart|status}"
56     exit 1
57     ;;
58     esac