@@ -76,49 +76,10 @@ cat /dev/null > ${LOG_DIR}/localstack_infra.err
7676# run modern runtime init scripts before starting localstack
7777test -d /etc/localstack/init/boot.d && /opt/code/localstack/.venv/bin/python -m localstack.runtime.init BOOT
7878
79+ # TODO: maybe we can simplify this by making supervisord block the main process?
7980supervisord -c /etc/supervisord.conf &
8081suppid=" $! "
8182
82-
83- # FIXME: remove with 2.0
84- if [[ ! $INIT_SCRIPTS_PATH ]]
85- then
86- INIT_SCRIPTS_PATH=/docker-entrypoint-initaws.d
87- fi
88- # check if the init script directory exists (by default it does not)
89- if [ -d " $INIT_SCRIPTS_PATH " ]; then
90- # unless LEGACY_INIT_DIR is explicitly set to 1 print a prominent warning
91- if [[ -z ${LEGACY_INIT_DIR} ]] || [[ ${LEGACY_INIT_DIR} == " 0" ]]; then
92- echo " WARNING"
93- echo " ============================================================================"
94- echo " It seems you are using an init script in $INIT_SCRIPTS_PATH ."
95- echo " The INIT_SCRIPTS_PATH have been deprecated with v1.1.0 and will be removed in future releases"
96- echo " of LocalStack. Please use /etc/localstack/init/ready.d instead."
97- echo " You can suppress this warning by setting LEGACY_INIT_DIR=1."
98- echo " "
99- echo " See: https://github.com/localstack/localstack/issues/7257"
100- echo " ============================================================================"
101- echo " "
102- fi
103- fi
104- function run_startup_scripts {
105- until grep -q ' ^Ready.' ${LOG_DIR} /localstack_infra.log > /dev/null 2>&1 ; do
106- echo " Waiting for all LocalStack services to be ready"
107- sleep 7
108- done
109-
110- curl -XPUT -s -H " Content-Type: application/json" -d ' {"features:initScripts":"initializing"}' " http://localhost:$EDGE_PORT /_localstack/health" > /dev/null
111- for f in $INIT_SCRIPTS_PATH /* ; do
112- case " $f " in
113- * .sh) echo " $0 : running $f " ; . " $f " ;;
114- * ) echo " $0 : ignoring $f " ;;
115- esac
116- echo
117- done
118- curl -XPUT -s -H " Content-Type: application/json" -d ' {"features:initScripts":"initialized"}' " http://localhost:$EDGE_PORT /_localstack/health" > /dev/null
119- }
120- run_startup_scripts &
121-
12283# Run tail on the localstack log files forever until we are told to terminate
12384if [ " $DISABLE_TERM_HANDLER " == " " ]; then
12485 while true ; do
0 commit comments