This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -x | |
term_handler() { | |
echo "Stopping the server process with PID $PID" | |
erl -noshell -name "[email protected]" -eval "rpc:call('[email protected]', init, stop, [])" -s init stop | |
echo "Stopped" | |
} | |
trap 'term_handler' TERM INT |