From 85fe709e06176c9ba91f879fb886d33bbffc2ffe Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 18 Jun 2019 23:11:47 -0600 Subject: [PATCH] update function commentary --- seafbackup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/seafbackup.sh b/seafbackup.sh index 1c4a503..25724d7 100755 --- a/seafbackup.sh +++ b/seafbackup.sh @@ -83,6 +83,7 @@ cleanup () { fi } +# call cleanup and then exit with error report exitError () { printf "${err}[%s] -- [ERROR] %s: %s --${norm}\n" \ "$(stamp)" "$1" "$2" >> "$logFile" @@ -129,6 +130,7 @@ stamp () { (date +%F" "%T) } +# same as exitError but for signal captures trapExit () { printf "${err}[%s] -- [ERROR] 99: Caught signal --${norm}\n" \ "$(stamp)" >> "$logFile"