send result by email
This commit is contained in:
parent
c033e89f58
commit
e1fc242f4e
|
@ -31,6 +31,7 @@ if [ "$_task_id" != null ] ; then
|
|||
echo "Task created: $_task_id"
|
||||
else
|
||||
echo "Error: $_result"
|
||||
printf "Subject: Fail: Todo: '%s'\n\n%s\n----------------------\n%s" "$_title" "$_result" "$_description" | sendmail -f server@gabbaell.co.uk kanboard.docker@gabbaell.co.uk
|
||||
exit 6
|
||||
fi
|
||||
|
||||
|
@ -42,7 +43,9 @@ _result="$(curl --user $_api_auth \
|
|||
_status="$(echo "$_result" | jq '.result')"
|
||||
if [ "$_status" = true ] ; then
|
||||
echo "Task moved: $_status"
|
||||
printf "Subject: OK: Todo: '%s'\n\n%s" "$_title" "$_description" | sendmail -f server@gabbaell.co.uk kanboard.docker@gabbaell.co.uk
|
||||
else
|
||||
echo "Error: $_result"
|
||||
printf "Subject: Fail: Todo: '%s'\n\n%s\n----------------------\n%s" "$_title" "$_result" "$_description" | sendmail -f server@gabbaell.co.uk kanboard.docker@gabbaell.co.uk
|
||||
exit 9
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue