Added option to add system commands at init and exit of the container. These commands will usually be set in Dockerfile of child images.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-08-29 00:06:56 +08:00
parent 63476fa2eb
commit 867c36cec9

View File

@@ -3,6 +3,8 @@ set -x
term_handler() {
eval $USER_COMMAND_EXIT
eval $SYS_COMMAND_EXIT
exit 143; # 128 + 15 -- SIGTERM
}
@@ -14,6 +16,7 @@ sudo mkhomedir_helper `whoami`
touch $LOG_FILE
eval $SYS_COMMAND_INIT &
eval $USER_COMMAND_INIT &
tail -f $LOG_FILE & wait ${!}