Skip to content

Commit

Permalink
fix handling of term signals
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Jun 25, 2024
1 parent e12418a commit 099868b
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,7 @@
###################################################################
envsubst < /matterbridge/config-template.toml > /matterbridge/config.toml

#####################################
# Pass SIGTERM to Matterbridge proc #
#####################################
function _term {
echo "Sending SIGTERM to matterbridge"

kill --TERM "$PID" 2>/dev/null
}

trap _term SIGTERM

####################
# Start Matterbridge #
####################
matterbridge -conf /matterbridge/config.toml &

PID=$!

#####################################
# Wait for this process to complete #
#####################################
wait "$PID"
/bin/matterbridge -conf /matterbridge/config.toml

0 comments on commit 099868b

Please sign in to comment.