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_already_running "Cyrus Replication"
34 msg_starting "Cyrus Replication"
35 start-stop-daemon --start --quiet --exec /usr/lib/cyrus/sync_client -- -r
36 if ps -C sync_client >/dev/null 2>&1; then
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cyrus-sync
46 if [ ! -f /var/lock/subsys/cyrus-sync ]; then
47 msg_not_running "Cyrus Replication"
52 msg_stopping "Cyrus Replication"
53 start-stop-daemon --stop --quiet --name sync_client
55 if [ $RETVAL -eq 0 ]; then
56 rm -f /var/lock/subsys/cyrus-sync
64 if [ ! -f /var/lock/subsys/cyrus-sync ]; then
65 msg_not_running "Cyrus Replication"
75 # See how we were called.
94 status cyrus-sync sync_client
98 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"