-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds the ability to run one more more commands before or after the rsync runs on the client side. This can be used for database snapshots, dumps, etc.
- Loading branch information
Clayton O'Neill
committed
Dec 20, 2016
1 parent
e10bd6e
commit 061e599
Showing
4 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
#!/bin/bash -e | ||
exec <%= @cmd_client_rsync %> --server --sender $* | ||
<% if @preexec.size > 0 -%> | ||
{ # Redirect output to /dev/null so that the reciever isn't confused by | ||
# extraneous output | ||
<%= @preexec.join("\n") %> | ||
} > /dev/null 2>&1 | ||
<% end -%> | ||
<%= @cmd_client_rsync %> --server --sender $* | ||
<% if @postexec.size > 0 -%> | ||
{ # Redirect output to /dev/null so that the reciever isn't confused by | ||
# extraneous output | ||
<%= @postexec.join("\n") %> | ||
} > /dev/null 2>&1 | ||
<% end -%> |