#!/sbin/openrc-run
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

PIDFILE=/var/run/csync2.pid
BINARY=/usr/sbin/csync2

start() {
   ebegin "Starting csync2"
   start-stop-daemon --start --pidfile "${PIDFILE}" -m -x ${BINARY} -b -- -ii
   eend $?
}

stop() {
   ebegin "Stopping csync2"
   start-stop-daemon --stop --pidfile "${PIDFILE}"
   eend $?
}

restart() {
   ebegin "Restarting csync2"
   svc_stop
   svc_start
   eend $?
}
