1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 17:58:16 +00:00

16 lines
269 B
Bash
Raw Normal View History

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