3 # cyrus-sync cyrus-sync Cyrus replication service
7 # description: cyrus-imap replication service
10 # Source function library
11 . /etc/rc.d/init.d/functions
14 . /etc/sysconfig/network
16 # Check that networking is up.
17 if is_yes "${NETWORKING}"; then
18 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
19 msg_network_down cyrus-sync
27 # Check if the service is already running?
28 if [ ! -f /var/lock/subsys/cyrus-sync ]; then
29 msg_starting cyrus-sync
30 start-stop-daemon --start --quiet --exec /usr/lib/cyrus/sync_client -- -r
31 if ps -C sync_client >/dev/null 2>&1; then
33 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cyrus-sync
39 msg_already_running cyrus-sync
44 if [ -f /var/lock/subsys/cyrus-sync ]; then
46 msg_stopping cyrus-sync
47 start-stop-daemon --stop --quiet --name "sync_client"
49 if [ $RETVAL -eq 0 ]; then
50 rm -f /var/lock/subsys/cyrus-sync
56 msg_not_running cyrus-sync
61 if [ -f /var/lock/subsys/cyrus-sync ]; then
65 msg_not_running cyrus-sync
71 # See how we were called.
94 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"