Skip to content

Commit

Permalink
trap exit and return 1
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Apr 11, 2021
1 parent fced70b commit 11fa89c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hook/zm_event_start.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash

trap 'cleanup' SIGINT SIGTERM

# Handle situation of ZM terminates while this is running
# so notifications are not sent
cleanup() {
exit 1
}

# When invoked by zmeventnotification.pl it will be passed:
# $1 = eventId that triggered an alarm
# $2 = monitor ID of monitor that triggered an alarm
Expand Down

0 comments on commit 11fa89c

Please sign in to comment.