BACKUP_RUNEVERYNTHDAY=1
_ERROR_ENCOUNTERED=0
-_UPPERME=$(echo $(basename $0) | tr '[:lower:]' '[:upper:]')
function timestamp {
- date +"[%y-%m-%d %H:%M:%S]"
+ date +'[%y-%m-%d|%H:%M:%S]'
}
function scottyline {
- echo $(timestamp) $_UPPERME: $@
+ echo $(timestamp) $@
}
function scottyinfo {
- if ($_ERROR_ENCOUNTERED -eq 0); then
+ if [ $_ERROR_ENCOUNTERED -eq 0 ]; then
scottyline $@
else
scottyline $@ >&2
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 {