clsync-start-rsyncshell.sh 345 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. mkdir -m 700 -p testdir/from testdir/to testdir/listdir
  3. cat > rules <<EOF
  4. -d^[Dd]ont[Ss]ync\$
  5. +*.*
  6. EOF
  7. case "$(uname -s)" in
  8. GNU/kFreeBSD)
  9. OPTS=''
  10. ;;
  11. *)
  12. OPTS='-p safe'
  13. ;;
  14. esac
  15. sudo "$(which clsync)" -K example-rsync -l test -M rsyncshell -w2 -t5 -W ./testdir/from -S ./clsync-synchandler-rsyncshell.sh -R rules $OPTS $@