better output format for entrypoint generic command and try

master
David Kebler 2023-04-22 10:22:50 -07:00
parent 98e943037c
commit abea829cab
2 changed files with 6 additions and 2 deletions

View File

@ -27,13 +27,15 @@ shift 1
/bin/bash -l -c '${ENTRYPOINT_CMD_PATH:-$BIN_DIR/start} $@' $0 "$@" /bin/bash -l -c '${ENTRYPOINT_CMD_PATH:-$BIN_DIR/start} $@' $0 "$@"
;; ;;
*) *)
echo command passed to container "$*" echo "--- command passed to container: $* ---"
echo -e "output:\n"
if [ -n "$*" ]; then if [ -n "$*" ]; then
if ! /bin/bash -l -c '$@' $0 "$@" ; then if ! /bin/bash -l -c '$@' $0 "$@" ; then
$BIN_DIR/entrypoint-help $BIN_DIR/entrypoint-help
fi fi
echo -e "\n------------------------------\n"
else else
echo no command was passed to entrypoint echo "!!!! no command was passed to entrypoint !!!! "
echo echo
$BIN_DIR/entrypoint-help $BIN_DIR/entrypoint-help
fi fi

View File

@ -158,7 +158,9 @@ END
elif [[ $script ]]; then elif [[ $script ]]; then
$([[ -f $script ]] && echo cat || echo "echo") "$script" | $dcmd $([[ -f $script ]] && echo cat || echo "echo") "$script" | $dcmd
else else
echo -e "\n ----------------------------------------------"
$dcmd $dcmd
echo -e "\n ----------------------------------------------"
echo -e "\ndone with session, removing containter try-$name" echo -e "\ndone with session, removing containter try-$name"
if [[ $mp ]] ; then if [[ $mp ]] ; then
echo removing volume $vname used for mapping echo removing volume $vname used for mapping