Browse Source

Better detection of errors when installing docker

migrate-pregen
nicolas.dorier 7 years ago
parent
commit
88d5600c57
  1. 13
      btcpay-setup.sh

13
btcpay-setup.sh

@ -148,13 +148,13 @@ chmod +x /etc/profile.d/btcpay-env.sh
echo "BTCPay Server environment variables successfully saved in /etc/profile.d/btcpay-env.sh" echo "BTCPay Server environment variables successfully saved in /etc/profile.d/btcpay-env.sh"
if ! [ -x "$(command -v docker)" ] || ! [ -x "$(command -v docker-compose)" ]; then if ! [ -x "$(command -v docker)" ] || ! [ -x "$(command -v docker-compose)" ]; then
apt-get update 2>error apt-get update || true 2>error
apt-get install -y \ apt-get install -y \
curl \ curl \
apt-transport-https \ apt-transport-https \
ca-certificates \ ca-certificates \
software-properties-common \ software-properties-common \
2>error || true 2>error
fi fi
if ! [ -x "$(command -v docker)" ]; then if ! [ -x "$(command -v docker)" ]; then
@ -163,7 +163,7 @@ if ! [ -x "$(command -v docker)" ]; then
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \ $(lsb_release -cs) \
stable" stable"
apt-get update apt-get update || true 2>error
if apt-get install -y docker-ce ; then if apt-get install -y docker-ce ; then
echo "Docker installed" echo "Docker installed"
else else
@ -173,8 +173,11 @@ if ! [ -x "$(command -v docker)" ]; then
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
artful \ artful \
stable" stable"
apt-get update apt-get update || true 2>error
apt-get install -y docker-ce if ! apt-get install -y docker-ce; then
echo "Failed to install docker installed"
return
fi
fi fi
fi fi
else else

Loading…
Cancel
Save