Use array expansion.
@@ -110,7 +110,7 @@ function check_args()
sudo chmod 777 "$POSEIDON_PREFIX"/opt/redis "$POSEIDON_PREFIX"/opt/poseidon_files
sudo touch "$POSEIDON_PREFIX"/opt/poseidon/.poseidon_history
sudo chmod 777 "$POSEIDON_PREFIX"/opt/poseidon/.poseidon_history
- composefiles="-f docker-compose.yaml -f helpers/faucet/docker-compose.yaml"
+ composefiles=(-f docker-compose.yaml -f helpers/faucet/docker-compose.yaml)
installtype="--complete"
if [ "$2" != "" ] ; then
installtype="$2"
@@ -131,9 +131,9 @@ function check_args()
curl -L https://docs.faucet.nz/en/latest/_static/grafana-dashboards/faucet_instrumentation.json > "$POSEIDON_PREFIX"/opt/grafana/dashboards/faucet_instrumentation.json || true
curl -L https://docs.faucet.nz/en/latest/_static/grafana-dashboards/faucet_inventory.json > "$POSEIDON_PREFIX"/opt/grafana/dashboards/faucet_inventory.json || true
curl -L https://docs.faucet.nz/en/latest/_static/grafana-dashboards/faucet_port_statistics.json > "$POSEIDON_PREFIX"/opt/grafana/dashboards/faucet_port_statistics.json || true
- composefiles="$composefiles -f helpers/faucet/docker-compose-faucet.yaml -f helpers/faucet/docker-compose-monitoring.yaml"
+ composefiles+=(-f helpers/faucet/docker-compose-faucet.yaml -f helpers/faucet/docker-compose-monitoring.yaml)
fi
- docker-compose "$composefiles" up -d --build || die "docker-compose returned an error"
+ docker-compose "${composefiles[@]}" up -d --build || die "docker-compose returned an error"
echo -n "Waiting for Poseidon to become healthy..."
until [ "$(docker ps -q --filter "label=com.docker.compose.service=poseidon")" ] && [ "$(docker inspect poseidon_poseidon_1 -f \{\{.State.Health.Status\}\})" = "healthy" ]
do
