PHP Classes

File: start.sh

Recommend this page to a friend!
  Packages of Moisés Lima   ETL Tools   start.sh   Download  
File: start.sh
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: ETL Tools
Tools to process data from a PostgreSQL database
Author: By
Last change:
Date: 7 months ago
Size: 625 bytes
 

Contents

Class file image Download
#!/bin/bash ports=(8501 8502 8503 8504 8505 8506 8507 8508 8509 8510) server_script="server.php" pids=() first=true for port in "${ports[@]}"; do echo "Iniciando servidor na porta $port..." if $first; then php "$server_script" "$port" true & # só o primeiro abre navegador first=false else php "$server_script" "$port" & # os outros sem navegador fi pids+=($!) done cleanup() { echo echo "Encerrando..." kill "${pids[@]}" 2>/dev/null exit 0 } trap cleanup SIGINT echo "Todos os servidores foram iniciados!" echo "Pressione CTRL+C para encerrar." wait "${pids[@]}"