Dell Optiplex GXa | SolarisTM 10 x86 3/05 |
rsync-2.6.4
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 "Okey! starting rsyncd server." else echo " Error! rsync already running" fi else echo "Error! file not found rsync or rsync.conf" fi ;; 'stop') kill $PID ;; 'restart') $0 stop sleep 2 $0 start ;; *) echo "Usage: $0 { start ¦ restart ¦ stop }" exit 1 ;; esac exit 0 |