3 # cyrus-sync cyrus-sync Cyrus replication service
7 # description: cyrus-imap replication service
11 # Source function library
12 . /etc/rc.d/init.d/functions
15 . /etc/sysconfig/network
17 # Check that networking is up.
18 if is_yes "${NETWORKING}"; then
19 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
20 msg_network_down "Cyrus Replication"
28 # Check if the service is already running?
29 if [ ! -f /var/lock/subsys/cyrus-sync ]; then
30 msg_starting "Cyrus Replication"
31 start-stop-daemon --start --quiet --exec /usr/lib/cyrus/sync_client -- -r
32 if ps -C sync_client >/dev/null 2>&1; then
34 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cyrus-sync
40 msg_already_running "Cyrus Replication"
45 if [ -f /var/lock/subsys/cyrus-sync ]; then
47 msg_stopping "Cyrus Replication"
48 start-stop-daemon --stop --quiet --name sync_client
50 if [ $RETVAL -eq 0 ]; then
51 rm -f /var/lock/subsys/cyrus-sync
57 msg_not_running "Cyrus Replication"
62 if [ -f /var/lock/subsys/cyrus-sync ]; then
66 msg_not_running "Cyrus Replication"
72 # See how we were called.
91 status cyrus-sync sync_client
95 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"