From 802e87fab69eb76fc270542772cc6c135b41353b Mon Sep 17 00:00:00 2001 From: senorsmile Date: Fri, 16 Jan 2015 22:40:17 -0800 Subject: [PATCH 1/2] fix missing test bracket on if type -p sendemail --- osync.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osync.sh b/osync.sh index 4e6601a..c92da19 100755 --- a/osync.sh +++ b/osync.sh @@ -233,7 +233,7 @@ function SendAlert fi elif type -p sendemail > /dev/null 2>&1 then - if [ "$SMTP_USER" != "" ] && "$SMTP_PASSWORD" != "" ] + if [ "$SMTP_USER" != "" ] && [ "$SMTP_PASSWORD" != "" ] then $SMTP_OPTIONS="-xu $SMTP_USER -xp $SMTP_PASSWORD" else From 260311623faf2e1d2fa82e8d07aef227ac23eb4b Mon Sep 17 00:00:00 2001 From: senorsmile Date: Fri, 16 Jan 2015 22:40:58 -0800 Subject: [PATCH 2/2] fix typo in trapquit logerror --- osync.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osync.sh b/osync.sh index c92da19..4de590c 100755 --- a/osync.sh +++ b/osync.sh @@ -127,7 +127,7 @@ function TrapQuit SendAlert UnlockDirectories CleanUp - LogError "Osync finished with errros." + LogError "Osync finished with errors." exitcode=1 else UnlockDirectories