3 # csync2 This shell script takes care of starting and stopping csync2
6 # description: csync2 daemon
9 # pidfile: /var/run/csync2.pid
11 # Source function library.
12 . /etc/rc.d/init.d/functions
14 # Source networking configuration.
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 csync2
27 # Get service configuration
28 [ -f /etc/sysconfig/csync2 ] && . /etc/sysconfig/csync2
31 # See how we were called.
35 if [ ! -f /var/lock/subsys/csync2 ]; then
37 daemon --fork csync2 -ii ${CSYNC2_OPTIONS}
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/csync2
41 msg_already_running csync2
46 if [ -f /var/lock/subsys/csync2 ]; then
49 rm -f /var/lock/subsys/csync2 >/dev/null 2>&1
51 msg_not_running csync2
54 restart|reload|force-restart|force-reload)
64 msg_usage "$0 {start|stop|restart|reload|force-restart|force-reload|status}"