X-Git-Url: https://git.treefish.org/~alex/backmeupscotty.git/blobdiff_plain/a2ef8e60326c6df9fa6191a022920caf5b604e8b..c5f074f40b959c83a23cf6bf065e0ce27096032e:/backmeupscotty diff --git a/backmeupscotty b/backmeupscotty index dd14711..ff0f07f 100644 --- a/backmeupscotty +++ b/backmeupscotty @@ -7,14 +7,13 @@ ARCHIVE_KEEPNDAYS=30 BACKUP_RUNEVERYNTHDAY=1 _ERROR_ENCOUNTERED=0 -_UPPERME=$(echo $(basename $0) | tr '[:lower:]' '[:upper:]') function timestamp { date +'[%y-%m-%d|%H:%M:%S]' } function scottyline { - echo $(timestamp) $_UPPERME: $@ + echo $(timestamp) $@ } function scottyinfo { @@ -27,7 +26,10 @@ function scottyinfo { function scottyerror { scottyline $@ >&2 - _ERROR_ENCOUNTERED=1 + if [ $_ERROR_ENCOUNTERED -eq 0 ]; then + _ERROR_ENCOUNTERED=1 + scottyline "Going into verbose mode after error encounter." >&2 + fi } function ssh255 {