Browse Source

Make sure changedomain is called correctly

migrate-pregen
nicolas.dorier 7 years ago
parent
commit
67bfa20c1f
  1. 5
      changedomain.sh

5
changedomain.sh

@ -3,6 +3,10 @@
. /etc/profile.d/btcpay-env.sh
export NEW_HOST="$1"
if [[ "$NEW_HOST" == https:* ]] || [[ "$NEW_HOST" == http:* ]]; then
echo "The domain should not start by http: or https:"
else
export OLD_HOST=`cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_HOST=\(.*\)$/\1/p'`
echo "Changing domain from \"$OLD_HOST\" to \"$NEW_HOST\""
@ -17,3 +21,4 @@ echo "ACME_CA_URI=$ACME_CA_URI" >> $BTCPAY_ENV_FILE
cd "`dirname $BTCPAY_ENV_FILE`"
docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d
fi

Loading…
Cancel
Save