Migrate to version + install marker file combo

This commit is contained in:
Taylor Helsper 2021-05-04 22:53:49 -05:00
parent 142421487d
commit b56dfcf71d
3 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#!/bin/bash
# Migrate from version file to version+install combo
# Check install for sd storage
FILES=$(ls /home/bitcoin/.mynode/*_version)
for file in $FILES; do
filename=$(basename $file)
shortname=${filename::-8}
touch /home/bitcoin/.mynode/install_$shortname
done
# Check install for ssd storage
FILES=$(ls /mnt/hdd/mynode/settings/*_version)
for file in $FILES; do
filename=$(basename $file)
shortname=${filename::-8}
touch /mnt/hdd/mynode/settings/install_$shortname
done
sync

View File

@ -40,6 +40,11 @@ if [ -f /mnt/hdd/mynode/settings/torify_apt_get ]; then
TORIFY="torify"
fi
# Migrate from version file to version+install combo
/usr/bin/mynode_migrate_version_files.sh
# Stop and disable any old services
systemctl disable https || true
systemctl stop https || true

View File

@ -284,6 +284,10 @@ if [ ! -f /mnt/hdd/mynode/settings/.setquicksyncdefault ]; then
fi
# Migrate from version file to version+install combo
/usr/bin/mynode_migrate_version_files.sh
# BTC Config
source /usr/bin/mynode_gen_bitcoin_config.sh