|
@ -88,34 +88,34 @@ WOOCOMMERCE_HOST=$WOOCOMMERCE_HOST" > $BTCPAY_ENV_FILE |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
btcpay_up() { |
|
|
btcpay_up() { |
|
|
pushd . |
|
|
pushd . > /dev/null |
|
|
cd "$(dirname "$BTCPAY_ENV_FILE")" |
|
|
cd "$(dirname "$BTCPAY_ENV_FILE")" |
|
|
docker-compose -f $BTCPAY_DOCKER_COMPOSE up --remove-orphans -d -t "${COMPOSE_HTTP_TIMEOUT:-180}" |
|
|
docker-compose -f $BTCPAY_DOCKER_COMPOSE up --remove-orphans -d -t "${COMPOSE_HTTP_TIMEOUT:-180}" |
|
|
# Depending on docker-compose, either the timeout does not work, or "compose -d and --timeout cannot be combined" |
|
|
# Depending on docker-compose, either the timeout does not work, or "compose -d and --timeout cannot be combined" |
|
|
if ! [ $? -eq 0 ]; then |
|
|
if ! [ $? -eq 0 ]; then |
|
|
docker-compose -f $BTCPAY_DOCKER_COMPOSE up --remove-orphans -d |
|
|
docker-compose -f $BTCPAY_DOCKER_COMPOSE up --remove-orphans -d |
|
|
fi |
|
|
fi |
|
|
popd |
|
|
popd > /dev/null |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
btcpay_down() { |
|
|
btcpay_down() { |
|
|
pushd . |
|
|
pushd . > /dev/null |
|
|
cd "$(dirname "$BTCPAY_ENV_FILE")" |
|
|
cd "$(dirname "$BTCPAY_ENV_FILE")" |
|
|
docker-compose -f $BTCPAY_DOCKER_COMPOSE down -t "${COMPOSE_HTTP_TIMEOUT:-180}" |
|
|
docker-compose -f $BTCPAY_DOCKER_COMPOSE down -t "${COMPOSE_HTTP_TIMEOUT:-180}" |
|
|
# Depending on docker-compose, the timeout does not work. |
|
|
# Depending on docker-compose, the timeout does not work. |
|
|
if ! [ $? -eq 0 ]; then |
|
|
if ! [ $? -eq 0 ]; then |
|
|
docker-compose -f $BTCPAY_DOCKER_COMPOSE down |
|
|
docker-compose -f $BTCPAY_DOCKER_COMPOSE down |
|
|
fi |
|
|
fi |
|
|
popd |
|
|
popd > /dev/null |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
btcpay_restart() { |
|
|
btcpay_restart() { |
|
|
pushd . |
|
|
pushd . > /dev/null |
|
|
cd "$(dirname "$BTCPAY_ENV_FILE")" |
|
|
cd "$(dirname "$BTCPAY_ENV_FILE")" |
|
|
docker-compose -f $BTCPAY_DOCKER_COMPOSE restart -t "${COMPOSE_HTTP_TIMEOUT:-180}" |
|
|
docker-compose -f $BTCPAY_DOCKER_COMPOSE restart -t "${COMPOSE_HTTP_TIMEOUT:-180}" |
|
|
# Depending on docker-compose, the timeout does not work. |
|
|
# Depending on docker-compose, the timeout does not work. |
|
|
if ! [ $? -eq 0 ]; then |
|
|
if ! [ $? -eq 0 ]; then |
|
|
docker-compose -f $BTCPAY_DOCKER_COMPOSE restart |
|
|
docker-compose -f $BTCPAY_DOCKER_COMPOSE restart |
|
|
fi |
|
|
fi |
|
|
popd |
|
|
popd > /dev/null |
|
|
} |
|
|
} |