#!/bin/sh
#

pid=`cat /etc/rsyncd.pid`

case $1 in
'start')
        if [ "${pid}" = "" ]
        then
                if [ -x /usr/local/bin/rsync ]
                then
                        /usr/local/bin/rsync
                fi
        fi
        ;;
'stop')
        if [ "${pid}" != "" ]
        then
                /usr/bin/kill ${pid}
        fi
        ;;
*)
        echo "usage: /etc/init.d/rsync {start|stop}"
        ;;
esac