Pārlūkot izejas kodu

Docs: Improve logging in example automation script

* add a final info entry for successful completion
Greg Grossmeier 6 gadi atpakaļ
vecāks
revīzija
ac174e89b4
1 mainītis faili ar 7 papildinājumiem un 9 dzēšanām
  1. 7 9
      docs/quickstart.rst

+ 7 - 9
docs/quickstart.rst

@@ -219,16 +219,14 @@ backed up and that the ``prune`` command is keeping and deleting the correct bac
     # use highest exit code as global exit code
     # use highest exit code as global exit code
     global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit ))
     global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit ))
 
 
-    if [ ${global_exit} -eq 1 ];
-    then
-        info "Backup and/or Prune finished with a warning"
+    if [ ${global_exit} -eq 0 ]; then
+        info "Backup and Prune finished successfully"
+    elif [ ${global_exit} -eq 1 ]; then
+        info "Backup and/or Prune finished with warnings"
+    else
+        info "Backup and/or Prune finished with errors"
     fi
     fi
-
-    if [ ${global_exit} -gt 1 ];
-    then
-        info "Backup and/or Prune finished with an error"
-    fi
-
+    
     exit ${global_exit}
     exit ${global_exit}
 
 
 Pitfalls with shell variables and environment variables
 Pitfalls with shell variables and environment variables