Get the exit status of duplicity
Asked by
Henrik
I'm writing a shell script to handle the backup of one of our servers. I'm creating an error_handler that I want to call when a duplicity call fails or crashes, but I'm unable to find this out by checking the exit status of a duplicity run since it always seems to return 0. If it succeeds, if it fails because of incorrect params, if it crashes / throws an exception during execution, it always returns 0.
The way I'm currently trying to check this is by doing,
duplicity --force /root $REMOTE/
if [ $? != 0 ]; then
..
$? is always 0. How can I see if it has failed/crashed?
Thanks in advance!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Duplicity Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Henrik
- Solved:
- Last query:
- Last reply:
To post a message you must log in.