aboutsummaryrefslogtreecommitdiffstats
path: root/backup
diff options
context:
space:
mode:
authorEduardo Pedroni <e.pedroni91@gmail.com>2018-04-05 22:45:13 +0200
committerEduardo Pedroni <e.pedroni91@gmail.com>2018-04-05 22:45:13 +0200
commit4858406212ce03433e68a53d1972264c56802597 (patch)
tree148849fa72f49e94605abc14dc80a2274cc33fbd /backup
parentecad592e93045f698786d356ef9f0bbe51a61163 (diff)
Added error code check to backup script
Diffstat (limited to 'backup')
-rwxr-xr-xbackup6
1 files changed, 6 insertions, 0 deletions
diff --git a/backup b/backup
index 2588d0a..597be80 100755
--- a/backup
+++ b/backup
@@ -40,3 +40,9 @@ fi
echo "rsync $RSYNC_OPTS ${1%/}/* $2" >> "$LOG_FILE"
rsync $RSYNC_OPTS ${1%/}/* $2
+
+if [ $? -eq 0 ]; then
+ echo "Backup successful." >> "$LOG_FILE"
+else
+ echo "Backup exited with code $?"
+fi