From 2c26a903047decda11b866acd27f1bc30f63cc3e Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 4 Sep 2019 17:07:02 +0900 Subject: [PATCH] Make sure /etc/docker is writable before creating daemon.json --- .circleci/test-install.sh | 2 +- btcpay-setup.sh | 2 +- btcpay-update.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/test-install.sh b/.circleci/test-install.sh index 527c0bf..4658de7 100755 --- a/.circleci/test-install.sh +++ b/.circleci/test-install.sh @@ -17,7 +17,7 @@ export BTCPAYGEN_REVERSEPROXY="nginx" export BTCPAYGEN_LIGHTNING="clightning" source ./btcpay-setup.sh -i -timeout 5m bash .circleci/test-connectivity.sh +timeout 1m bash .circleci/test-connectivity.sh # Testing scripts are not crashing and installed btcpay-up.sh diff --git a/btcpay-setup.sh b/btcpay-setup.sh index ac86772..a7bc134 100755 --- a/btcpay-setup.sh +++ b/btcpay-setup.sh @@ -456,7 +456,7 @@ ExecReload=/bin/bash -c '. \"$BASH_PROFILE_SCRIPT\" && cd \"\$BTCPAY_BASE_DIRECT [Install] WantedBy=multi-user.target" > /etc/systemd/system/btcpayserver.service - if ! [[ -f "/etc/docker/daemon.json" ]]; then + if ! [[ -f "/etc/docker/daemon.json" ]] && [ -w "/etc/docker" ]; then echo "{ \"log-driver\": \"json-file\", \"log-opts\": {\"max-size\": \"5m\", \"max-file\": \"3\"} diff --git a/btcpay-update.sh b/btcpay-update.sh index 1758442..f05a33a 100755 --- a/btcpay-update.sh +++ b/btcpay-update.sh @@ -31,7 +31,7 @@ if [[ "$1" != "--skip-git-pull" ]]; then return fi -if ! [[ "$OSTYPE" == "darwin"* ]] && ! [ -f "/etc/docker/daemon.json" ] && [ -w "/etc/docker" ]; then +if ! [ -f "/etc/docker/daemon.json" ] && [ -w "/etc/docker" ]; then echo "{ \"log-driver\": \"json-file\", \"log-opts\": {\"max-size\": \"5m\", \"max-file\": \"3\"}