Hi,
We have some scripts that have multiple lines to run rsync as shown below having && at the end of the line causing
/sbin/fsck -y /dev/da0p1 &&
/bin/sleep 5 &&
/sbin/mount /bkup &&
/bin/sleep 4 &&
Two things here. How would we set the script to only run one rsync at a time until each one is finished and, how can we tell the script if /bkup is mounted to skip the line
Thanks for your help.
We have some scripts that have multiple lines to run rsync as shown below having && at the end of the line causing
Code:
Invalid null command.
/sbin/fsck -y /dev/da0p1 &&
/bin/sleep 5 &&
/sbin/mount /bkup &&
/bin/sleep 4 &&
Code:
/usr/local/bin/rsync -azP --ignore-existing /root/ /bkup/root &&
/usr/local/bin/rsync -azP --ignore-existing /etc/ /bkup/etc &&
/usr/local/bin/rsync -azP --ignore-existing /usr/local/etc/ /bkup/usr-local-etc &&
/usr/local/bin/rsync -azP --ignore-existing --remove-source-files /usr/local/ftp/myname/ /bkup/myname &&
/usr/local/bin/rsync -azP --ignore-existing --remove-source-files /usr/local/ftp/1-bkup/ /bkup/dir1 &&
/usr/local/bin/rsync -azP --ignore-existing --remove-source-files /usr/local/ftp/2-bkup/ /bkup/dir2 &&
/usr/local/bin/rsync -azP --ignore-existing --remove-source-files /usr/local/ftp/3-bkup/ /bkup/dir3 &&
Two things here. How would we set the script to only run one rsync at a time until each one is finished and, how can we tell the script if /bkup is mounted to skip the line
Code:
/sbin/mount /bkup &&
Thanks for your help.