Fix issue where Caravan re-installs on first upgrade for new image
This commit is contained in:
parent
4178b70836
commit
b59c944b97
|
@ -412,7 +412,6 @@ cd ~
|
|||
|
||||
# Install Caravan
|
||||
CARAVAN_UPGRADE_URL=https://github.com/unchained-capital/caravan/archive/$CARAVAN_VERSION.tar.gz
|
||||
CARAVAN_SETTINGS_UPDATE_FILE=/home/bitcoin/.mynode/caravan_settings_1
|
||||
CURRENT=""
|
||||
if [ -f $CARAVAN_VERSION_FILE ]; then
|
||||
CURRENT=$(cat $CARAVAN_VERSION_FILE)
|
||||
|
|
|
@ -41,6 +41,7 @@ LNDHUB_VERSION_FILE=/home/bitcoin/.mynode/lndhub_version
|
|||
LNDHUB_LATEST_VERSION_FILE=/home/bitcoin/.mynode/lndhub_version_latest
|
||||
|
||||
CARAVAN_VERSION="v0.3.5"
|
||||
CARAVAN_SETTINGS_UPDATE_FILE=/home/bitcoin/.mynode/caravan_settings_1
|
||||
CARAVAN_VERSION_FILE=/home/bitcoin/.mynode/caravan_version
|
||||
CARAVAN_LATEST_VERSION_FILE=/home/bitcoin/.mynode/caravan_version_latest
|
||||
|
||||
|
|
|
@ -521,7 +521,7 @@ CURRENT=""
|
|||
if [ -f $CARAVAN_VERSION_FILE ]; then
|
||||
CURRENT=$(cat $CARAVAN_VERSION_FILE)
|
||||
fi
|
||||
if [ "$CURRENT" != "$CARAVAN_VERSION" ]; then
|
||||
if [ "$CURRENT" != "$CARAVAN_VERSION" ] || [ ! -f $CARAVAN_SETTINGS_UPDATE_FILE ]; then
|
||||
cd /opt/mynode
|
||||
rm -rf caravan
|
||||
|
||||
|
@ -535,6 +535,7 @@ if [ "$CURRENT" != "$CARAVAN_VERSION" ]; then
|
|||
cd caravan
|
||||
sudo -u bitcoin npm install --only=production
|
||||
echo $CARAVAN_VERSION > $CARAVAN_VERSION_FILE
|
||||
touch $CARAVAN_SETTINGS_UPDATE_FILE
|
||||
fi
|
||||
cd ~
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user