logmonitor/etc/cont-init.d/00_bootstrap.sh
2021-01-28 14:10:11 +02:00

31 lines
377 B
Bash
Executable file

#!/usr/bin/with-contenv /bin/sh
set -e
#User params
#Internal params
if [ -z "$BOOTSTRAP_COMMAND" ]; then
RUN_CMD="/bin/true"
else
RUN_CMD=${BOOTSTRAP_COMMAND}
fi
# Test for Interactiveness
if test -t 0; then
$RUN_CMD
if [ "$@" ]; then
eval "$@"
else
export PS1='[\u@\h : \w]\$ '
/bin/sh
fi
else
if [ "$@" ]; then
eval "$@"
fi
$RUN_CMD
fi