From 111a821dc421e2a2b0f79cb8ff934daeaf99cc4e Mon Sep 17 00:00:00 2001 From: David Date: Tue, 7 Nov 2023 14:15:23 -0500 Subject: [PATCH] combine mkdir + chmod commands Co-authored-by: Arkadii Yakovets --- infrastructure/deploy.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/infrastructure/deploy.sh b/infrastructure/deploy.sh index a8e9332ce..dcdbfae4e 100755 --- a/infrastructure/deploy.sh +++ b/infrastructure/deploy.sh @@ -388,18 +388,12 @@ if [[ -n $container_running ]]; then -i data-refinery-key.pem \ api-configuration/environment "ubuntu@$API_IP_ADDRESS:/home/ubuntu/environment" - # Ensure the API's static file dir exists and is accessible" + # Ensure the API's static file dir exists and is accessible. ssh -o StrictHostKeyChecking=no \ -o ServerAliveInterval=15 \ -o ConnectTimeout=5 \ -i data-refinery-key.pem \ - "ubuntu@$API_IP_ADDRESS" "mkdir -p /var/www/volumes_static" - - ssh -o StrictHostKeyChecking=no \ - -o ServerAliveInterval=15 \ - -o ConnectTimeout=5 \ - -i data-refinery-key.pem \ - "ubuntu@$API_IP_ADDRESS" "chmod a+rwx /var/www/volumes_static" + "ubuntu@$API_IP_ADDRESS" "mkdir -m a+rwx -p /var/www/volumes_static" # shellcheck disable=SC2029 ssh -o StrictHostKeyChecking=no \