From 6eb9a46d18e35cc82d93367e3a93cc2af6b1147d Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Tue, 27 Nov 2018 11:23:50 +0900 Subject: [PATCH] do not apt-get if curl is already installed --- btcpay-setup.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/btcpay-setup.sh b/btcpay-setup.sh index ae75e80..0881af1 100755 --- a/btcpay-setup.sh +++ b/btcpay-setup.sh @@ -216,13 +216,15 @@ echo -e "BTCPay Server docker-compose parameters saved in $BTCPAY_ENV_FILE\n" . /etc/profile.d/btcpay-env.sh if ! [ -x "$(command -v docker)" ] || ! [ -x "$(command -v docker-compose)" ]; then - apt-get update 2>error - apt-get install -y \ - curl \ - apt-transport-https \ - ca-certificates \ - software-properties-common \ - 2>error + if ! [ -x "$(command -v curl)" ]; then + apt-get update 2>error + apt-get install -y \ + curl \ + apt-transport-https \ + ca-certificates \ + software-properties-common \ + 2>error + fi if ! [ -x "$(command -v docker)" ]; then echo "Trying to install docker..." curl -fsSL https://get.docker.com -o get-docker.sh