Change backup command
This commit is contained in:
parent
24d93e3d18
commit
33f125a7e8
@ -15,11 +15,11 @@ let
|
|||||||
exit_code=0;
|
exit_code=0;
|
||||||
for i in ''${BACKUP_HELPER_DIRS//,/ }; do
|
for i in ''${BACKUP_HELPER_DIRS//,/ }; do
|
||||||
echo "Starting backup of $i";
|
echo "Starting backup of $i";
|
||||||
output=$(restic backup "$i" && rc=$? || rc=$?);
|
output=$(restic backup "$i");
|
||||||
if [ $rc -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
|
exit_code="$?";
|
||||||
echo "Backup of $i failed with exit code $rc:"
|
echo "Backup of $i failed with exit code $rc:"
|
||||||
echo "$output"
|
echo "$output"
|
||||||
exit_code="$rc";
|
|
||||||
else
|
else
|
||||||
echo "Backup of $i successful:"
|
echo "Backup of $i successful:"
|
||||||
echo "$output"
|
echo "$output"
|
||||||
|
Loading…
Reference in New Issue
Block a user