Skip to content

Instantly share code, notes, and snippets.

@Geesu
Created May 7, 2014 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Geesu/3b8b35e108d8e2205da7 to your computer and use it in GitHub Desktop.
Save Geesu/3b8b35e108d8e2205da7 to your computer and use it in GitHub Desktop.
#!/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