Files
ubuntu/scripts/entrypoint.sh

16 lines
212 B
Bash
Executable File

#!/usr/bin/env bash
set -x
term_handler() {
$USER_COMMAND_EXIT
exit 143; # 128 + 15 -- SIGTERM
}
trap 'kill ${!}; term_handler' SIGTERM
touch $LOG_FILE
$USER_COMMAND_INIT &
tail -f $LOG_FILE & wait ${!}