Skip to content

Commit

Permalink
Make sure webapp is killed on email script exit
Browse files Browse the repository at this point in the history
  • Loading branch information
booxter committed Nov 20, 2024
1 parent e8bf6f8 commit 666e493
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/email.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ if [ "$1" = "--start-server" ]; then
sleep 10 # Wait for the server to start.
fi

trap 'kill %1' EXIT

[email protected]
TOADDRS=$FROMADDR

Expand All @@ -20,6 +22,3 @@ mailsend-go -from $FROMADDR -t $TOADDRS -sub "Movies for $(date '+%Y-%m-%d')" \
body -file "$reportfile"

rm -r "$tmpdir"

kill %1
exit

0 comments on commit 666e493

Please sign in to comment.