]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/cyrus-imapd/files/cyrus
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / cyrus-imapd / files / cyrus
1 #! /bin/sh
2
3 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/cyrus/bin
4 DAEMON=/usr/cyrus/bin/master
5 NAME=master
6 DESC="Cyrus IMAP Master Daemon"
7
8 case "$1" in
9   start)
10         echo -n "Starting $DESC: $NAME"
11         start-stop-daemon --start --quiet --background --pidfile /var/run/$NAME.pid  --exec $DAEMON
12         echo "."
13         ;;
14   stop)
15         echo -n "Stopping $DESC: $NAME "
16         start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON
17         sleep 1
18         killall imapd pop3d timsieved master lmtpd notifyd 2>/dev/null
19         echo "."
20         ;;
21   reload|force-reload)
22         echo "Reloading $DESC configuration..."
23         start-stop-daemon --stop --signal 1 --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON
24         echo "done."
25         ;;
26   restart)
27         $0 stop
28         sleep 1
29         $0 start
30         ;;
31   *)
32         N=/etc/init.d/$NAME
33         echo "Usage: $N {start|stop|reload|restart|force-reload}" >&2
34         exit 1
35         ;;
36 esac
37 exit 0
38