Dell Dimension 8200 | SolarisTM 10 x86 1/06 |
rsync-2.6.7
syslog facility = local5 uid = nobody gid = nogroup use chroot = yes max connections = 4 read only = yes [mydir] path = /export/home/me hosts allow=192.168.1.0/24 |
#!/sbin/sh PID=`ps -ef ¦ grep 'rsync --daemon' ¦ grep -v grep ¦ gawk '{print $2}'` case "$1" in 'start') if [ -f /usr/local/bin/rsync -a -f /etc/rsyncd.conf ]; then if [ -z "$PID" ] ; then /usr/local/bin/rsync --daemon echo " rsync [start]" else echo " Error! rsync already running" fi else echo "Error! file not found rsync or rsync.conf" fi ;; 'stop') kill $PID echo " rsync [stop]" ;; 'restart') $0 stop sleep 2 $0 start ;; *) echo "Usage: $0 { start ¦ restart ¦ stop }" exit 1 ;; esac exit 0 |