From 666e49322bab36f5dc976fd324015675caf71f2c Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Wed, 20 Nov 2024 18:56:26 -0500 Subject: [PATCH] Make sure webapp is killed on email script exit --- scripts/email.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/email.sh b/scripts/email.sh index 25a9f69..baa4dc5 100755 --- a/scripts/email.sh +++ b/scripts/email.sh @@ -8,6 +8,8 @@ if [ "$1" = "--start-server" ]; then sleep 10 # Wait for the server to start. fi +trap 'kill %1' EXIT + FROMADDR=ihar.hrachyshka@gmail.com TOADDRS=$FROMADDR @@ -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