mc-cluster/holesail-connector/pm2-setup.sh

21 lines
977 B
Bash
Raw Permalink Normal View History

2024-12-06 05:52:08 -05:00
#!/bin/bash
# Define connection strings and ports
2024-12-06 06:38:37 -05:00
# MAKE SURE TO CHANGE THESE TO YOUR OWN CUSTOM STRINGS!
2024-12-06 05:52:08 -05:00
declare -A connections
connections=(
["8d4637169e8c7a86fd6cbfe5447af3c36746acf8f30e6c0717e7c04df8d4e1a3cf5e36dac34304f278aaed127169fa291075758aca7ddd001cbed444cd2b0f697a"]=8001
["42f6766a67ad90a4743fed463e8eac8b9009f6904dc45444b6ae71340eac978a694b84b20d7bf20fa69039216ca35fd8b0ae1a60afc11f5069418f2c8dc7d8490f"]=8002
["8a04374263b622a53002e6043bc0347095e717d2e9b39e39ce2646a9d84a2e13d0b3c125faf008586104aa5e622f6b7c2d5d4dddef5afb63fd0240f13c72308da5"]=8003
["8771ce498444a9dc50f27893ee3aaca4ea97c62662515ba510224306b1adeeeec7c91133f055d574a42c82e98d5225edbd408258f46d28c53a6856aa94bb0d5b36"]=8004
)
# Launch PM2 processes
for connection in "${!connections[@]}"; do
port=${connections[$connection]}
pm2 start holesail --name "holesail-$port" -- "$connection" --host 0.0.0.0 --port "$port"
done
# Keep the container running
pm2-runtime start all