@ -9,20 +9,39 @@ if [ ! -z $BTCPAY_DOCKER_COMPOSE ] && [ ! -z $DOWNLOAD_ROOT ] && [ -z $BTCPAYGEN
exit
fi
cd " $BTCPAY_BASE_DIRECTORY /btcpayserver-docker "
git pull --force
if [ [ $BTCPAY_DOCKER_COMPOSE = = *docker-compose.generated.yml ] ] ; then
# Generate the docker compose in BTCPAY_DOCKER_COMPOSE
. ./build.sh
if [ " $BTCPAYGEN_OLD_PREGEN " = = "true" ] ; then
cp Generated/docker-compose.generated.yml $BTCPAY_DOCKER_COMPOSE
fi
if [ [ $BTCPAY_DOCKER_COMPOSE != *docker-compose.generated.yml ] ] ; then
echo " You seem to use pre generated docker compose, this is now deprecated.
Your deployment is too old, you need to migrate by following instructions on this link https://github.com/btcpayserver/btcpayserver-docker/tree/master#i-deployed-before-btcpay-setupsh-existed-before-may-17-can-i-migrate-to-this-new-system"
exit
fi
cd " $BTCPAY_BASE_DIRECTORY /btcpayserver-docker "
if [ " $BTCPAYGEN_OLD_PREGEN " = = "true" ] ; then
btcpay-down.sh
for volume in /var/lib/docker/volumes/production_*/_data; do
volumedest = ${ volume /production_/generated_ }
echo " Copying $volume to $volumedest "
[ -d " $volumedest " ] && rm -rf " $volumedest "
mkdir -p $volumedest
mv $volume $volumedest
rm -rf /var/lib/docker/volumes/production_*
done
BTCPAYGEN_OLD_PREGEN = "false"
BTCPAY_DOCKER_COMPOSE = " $( pwd ) /Generated/docker-compose.generated.yml "
sed -i '/^export BTCPAYGEN_OLD_PREGEN/d' /etc/profile.d/btcpay-env.sh
sed -i '/^export BTCPAY_DOCKER_COMPOSE/d' /etc/profile.d/btcpay-env.sh
echo "export BTCPAYGEN_OLD_PREGEN=\"false\"" >> /etc/profile.d/btcpay-env.sh
echo " export BTCPAY_DOCKER_COMPOSE=\" $BTCPAY_DOCKER_COMPOSE \" " >> /etc/profile.d/btcpay-env.sh
echo "Your setup has been partially updated, you still need to close your SSH session and run btcpay-update.sh again"
exit
fi
git pull --force
. ./build.sh
for scriptname in *.sh; do
if [ " $scriptname " = = "build.sh" ] || \
[ " $scriptname " = = "build-pregen.sh" ] || \
[ " $scriptname " = = "btcpay-setclocale.sh" ] ; then
continue ;
fi
@ -33,4 +52,4 @@ for scriptname in *.sh; do
done
cd " `dirname $BTCPAY_ENV_FILE ` "
docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d --remove-orphans
btcpay-up.sh