From: Bastian Dehn Date: Sat, 18 Nov 2017 14:00:32 +0000 (+0100) Subject: fix: code style in notify.sh X-Git-Tag: v1.0.0^2~96 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=8d2df0b1dc7a85ce92dcb6f7bdbd1f4265db4477;p=albentohandy.git fix: code style in notify.sh --- diff --git a/notify.sh b/notify.sh index 81263a2..2155243 100755 --- a/notify.sh +++ b/notify.sh @@ -18,24 +18,21 @@ else fi # send email to notify user -sendEmail() -{ -if [ $NOTIFY == true ]; then - sendemail -f $FROMADDRESS -t $TOADDRESS \ +sendEmail() { + if [ $NOTIFY == true ]; then + sendemail -f $FROMADDRESS -t $TOADDRESS \ -s $SMTP -xu $SMTPUSERNAME -xp $(echo $SMTPPASSWORD | base64 --decode) -o tls=yes \ -u "albentohandy" -o message-content-type=html -m "$MESSAGE" -fi + fi } # add current date in message -currentDate() -{ +currentDate() { MESSAGE="${MESSAGE}$(date +"%Y-%m-%d %H:%M:%S") " } # open html, header and body -openMail() -{ +openMail() { MESSAGE="\n \ \n \ albentohandy.sh notify\n \ @@ -44,14 +41,12 @@ openMail() } # write message -addInfo() -{ +addInfo() { MESSAGE="${MESSAGE}$1\n" } # close body andy html -closeMail() -{ +closeMail() { MESSAGE="${MESSAGE}\n \ \n \ \n"