Exit status should be other than zero if backupninja something goes wrong
Currently the backupninja execution exits with the zero exit code on all situations, even When fatals, errors or warnings happen. The exit code should be other than zero if something goes wrong.
Advantages:
- Fits Bash manual: http://www.gnu.org/software/bash/manual/html_node/Exit-Status.html
- Exit code might be used by other script running backupninja (by catching the exit code "$?") This is currently my case: I am exeuting the /usr/sbin/backupninja from another script and backupninja always returns "0" even if something fails. This becomes difficult handling problems.
Here a three simple lines to add at the end of /usr/sbin/backupninja that solves the problem.
[ $errors == 0 ] || exit 1 [ $warnings == 0 ] || exit 1 [ $fatals == 0 ] || exit 2
(from redmine: created on 2014-11-20)