Reputation: 15919
What would be the simplest way to check if a remote SSH rsync fails from the host?
I don't care if the file couldn't be found, if a connection couldn't be established, or if RSYNC's dog died and had to attend its funeral. How would I specify:
if RSYNC fails, do something?
EDIT: RSYNC SSH not Daemon.
Upvotes: 1
Views: 2586
Reputation: 2921
you could create a bash script, such as:
if ssh <server> rsync; then
echo "SUCCESS"
else
echo "FAIL"
fi
Upvotes: 6