1
0
mirror of https://github.com/nginx-proxy/nginx-proxy synced 2025-02-05 13:51:40 +01:00
nginx-proxy/test/requirements/web/entrypoint.sh
2024-05-05 16:31:50 +02:00

16 lines
269 B
Bash

#!/bin/bash
set -u
trap '[ ${#PIDS[@]} -gt 0 ] && kill -TERM ${PIDS[@]}' TERM
declare -a PIDS
for port in $WEB_PORTS; do
echo starting a web server listening on port "$port";
/webserver.py "$port" &
PIDS+=($!)
done
wait "${PIDS[@]}"
trap - TERM
wait "${PIDS[@]}"