Files
containers/bitnami/wildfly/rootfs/app-entrypoint.sh
2017-02-14 15:47:26 +05:30

23 lines
541 B
Bash
Executable File

#!/bin/bash -e
function initialize {
# Package can be "installed" or "unpacked"
status=`nami inspect $1`
if [[ "$status" == *'"lifecycle": "unpacked"'* ]]; then
inputs=""
if [[ -f /$1-inputs.json ]]; then
inputs=--inputs-file=/$1-inputs.json
fi
nami initialize $1 $inputs
fi
}
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
for module in wildfly; do
initialize $module
done
echo "Starting application ..."
fi
exec /entrypoint.sh "$@"