All checks were successful
continuous-integration/drone/push Build is passing
23 lines
443 B
Bash
Executable File
23 lines
443 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -x
|
|
|
|
term_handler() {
|
|
eval $USER_COMMAND_EXIT
|
|
eval $SYS_COMMAND_EXIT
|
|
|
|
exit 143; # 128 + 15 -- SIGTERM
|
|
}
|
|
|
|
# setup handler when the container is exited
|
|
trap 'kill ${!}; term_handler' SIGTERM
|
|
|
|
# setup home directory for the current user. It is useful for attaching vscode with container.
|
|
sudo mkhomedir_helper `whoami`
|
|
|
|
touch $LOG_FILE
|
|
|
|
eval $SYS_COMMAND_INIT
|
|
eval $USER_COMMAND_INIT &
|
|
|
|
tail -f $LOG_FILE & wait ${!}
|