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"
|
echo "Task created: $_task_id"
|
||||||
else
|
else
|
||||||
echo "Error: $_result"
|
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
|
exit 6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -42,7 +43,9 @@ _result="$(curl --user $_api_auth \
|
||||||
_status="$(echo "$_result" | jq '.result')"
|
_status="$(echo "$_result" | jq '.result')"
|
||||||
if [ "$_status" = true ] ; then
|
if [ "$_status" = true ] ; then
|
||||||
echo "Task moved: $_status"
|
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
|
else
|
||||||
echo "Error: $_result"
|
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
|
exit 9
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue