3 # rsyncd This shell script takes care of starting and stopping rsyncd
6 # description: rsync daemon
9 # pidfile: /var/run/rsyncd.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 rsyncd
27 # Get service configuration
28 [ -f /etc/sysconfig/rsyncd ] && . /etc/sysconfig/rsyncd
32 if [ ! -f /var/lock/subsys/rsyncd ]; then
34 daemon /usr/bin/rsync --daemon --dparam=pidfile=/var/run/rsync.pid ${RSYNC_OPTIONS}
36 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rsyncd
38 msg_already_running rsyncd
44 if [ -f /var/lock/subsys/rsyncd ]; then
47 rm -f /var/lock/subsys/rsyncd >/dev/null 2>&1
49 msg_not_running rsyncd
54 if [ -f /var/lock/subsys/rsyncd ]; then
58 msg_not_running rsyncd
64 # See how we were called.
87 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"