Captain Zod wrote:

> Hi all,
> Does anyone have a sample rc startup file for cyrus-imapd? If not how do 
> you startup cyrus-imapd? I use master. The problem is that master does 
> not detach from the terminal! If I run it in the background and put it 
> into a startup script then I will not get the return status code!


Background the process with "&" like this:

---------------------------------------------------------------------
#!/bin/bash

start() {
                 echo -n "Starting Cyrus Mail Server... "
                 /usr/cyrus/bin/master &
                 echo "done"
}
stop() {
                 echo -n "Stopping Cyrus Mail Server... "
                 pkill master
                 echo "done"
}

case "$1" in
         start)
                 start;
                 ;;
         stop)
                 stop;
                 ;;
         restart)
                 stop;
                 sleep 2;
                 start;
                 ;;
         *)
                 echo "Usage: $0 {start|stop|restart}"
                 ;;
esac

--------------------------------------------------------------------


Phil
-- 
"They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety."
-Benjamin Franklin, 1759

Reply via email to