Files
ubuntu/scripts/entrypoint.sh

16 lines
222 B
Bash
Executable File

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