Created
May 7, 2014 01:49
-
-
Save Geesu/3b8b35e108d8e2205da7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
echoerr() { echo "$@" 1>&2; } | |
FAIL=0 | |
echoerr "Called" | |
`envdir /etc/wal-e.d/env /usr/local/bin/wal-e wal-push $1` & pid_1=$! | |
echoerr "Spawned replication process $pid_1" | |
wait $pid_1 || let "FAIL+=1" | |
if [ "$FAIL" == "0" ]; | |
then | |
echoerr "Replication success $1 $2" | |
else | |
echoerr "Replication failed $1 $2" | |
fi | |
exit "$FAIL" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment