Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions dockerfiles/alpine/apim/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,19 @@ test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${ar
echo "Start WSO2 Carbon server" >&2
if [[ -z "${PROFILE_NAME}" ]]
then
# Trapping Kill Signals and killing the leaf process
trap 'echo kill signal received!; kill -TERM $(tr -d "\0" < ${WSO2_SERVER_HOME}/wso2carbon.pid); wait' TERM INT
# start the server with the provided startup arguments
sh ${WSO2_SERVER_HOME}/bin/api-manager.sh "$@"
${WSO2_SERVER_HOME}/bin/api-manager.sh "$@" &
# Waiting for the Subprocess to finish
PID=$!
wait $PID
else
# Trapping Kill Signals and killing the leaf process
trap 'echo kill signal received!; kill -TERM $(tr -d "\0" < ${WSO2_SERVER_HOME}/wso2carbon.pid); wait' TERM INT
# start the server with the specified profile and provided startup arguments
sh ${WSO2_SERVER_HOME}/bin/api-manager.sh -Dprofile=${PROFILE_NAME} "$@"
sh ${WSO2_SERVER_HOME}/bin/api-manager.sh -Dprofile=${PROFILE_NAME} "$@" &
# Waiting for the Subprocess to finish
PID=$!
wait $PID
fi