mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-25 22:18:07 +00:00
Save device arch and do some docker re-installs if arch changes
This commit is contained in:
parent
1a478685d0
commit
307057c787
|
@ -20,6 +20,31 @@ while true; do
|
||||||
echo "Checking for building new docker images..."
|
echo "Checking for building new docker images..."
|
||||||
touch /tmp/installing_docker_images
|
touch /tmp/installing_docker_images
|
||||||
|
|
||||||
|
# Check if we happened to change architectures (move from 32-bit to 64-bit Raspi4 image)
|
||||||
|
CURRENT_ARCH=$(uname -m)
|
||||||
|
SAVED_ARCH="unknown"
|
||||||
|
if [ ! -f $DEVICE_ARCHITECTURE_FILE ]; then
|
||||||
|
echo $CURRENT_ARCH > $DEVICE_ARCHITECTURE_FILE
|
||||||
|
fi
|
||||||
|
if [ -f $DEVICE_ARCHITECTURE_FILE ]; then
|
||||||
|
SAVED_ARCH=$(cat $DEVICE_ARCHITECTURE_FILE)
|
||||||
|
fi
|
||||||
|
if [ "$CURRENT_ARCH" != "$SAVED_ARCH" ]; then
|
||||||
|
# Reset docker stuff
|
||||||
|
docker system prune --all --force
|
||||||
|
|
||||||
|
# Remove containers known to cause problems if cached
|
||||||
|
docker rmi debian:buster-slim
|
||||||
|
|
||||||
|
# Mark mempool and dojo for re-install
|
||||||
|
# Must reset version for Dojo or it will fully re-install and break rather than 'upgrade'
|
||||||
|
echo "reset" > $WEBSSH2_VERSION_FILE
|
||||||
|
echo "reset" > $NETDATA_VERSION_FILE
|
||||||
|
echo "reset" > $MEMPOOL_VERSION_FILE
|
||||||
|
echo "reset" > $DOJO_VERSION_FILE
|
||||||
|
fi
|
||||||
|
echo $CURRENT_ARCH > $DEVICE_ARCHITECTURE_FILE
|
||||||
|
|
||||||
# Pull images that don't need to be built
|
# Pull images that don't need to be built
|
||||||
# ???
|
# ???
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ SERIAL_NUM=$(mynode-get-device-serial)
|
||||||
# Set all default / standard bash config settings
|
# Set all default / standard bash config settings
|
||||||
MYNODE_DIR=/mnt/hdd/mynode
|
MYNODE_DIR=/mnt/hdd/mynode
|
||||||
MYNODE_STATUS_FILE=/tmp/.mynode_status
|
MYNODE_STATUS_FILE=/tmp/.mynode_status
|
||||||
|
DEVICE_ARCHITECTURE_FILE="/mnt/hdd/mynode/settings/.device_arch"
|
||||||
VPN_BACKUP_DIR=/mnt/hdd/mynode/vpn
|
VPN_BACKUP_DIR=/mnt/hdd/mynode/vpn
|
||||||
QUICKSYNC_DIR=/mnt/hdd/mynode/quicksync
|
QUICKSYNC_DIR=/mnt/hdd/mynode/quicksync
|
||||||
QUICKSYNC_CONFIG_DIR=/mnt/hdd/mynode/.config/transmission
|
QUICKSYNC_CONFIG_DIR=/mnt/hdd/mynode/.config/transmission
|
||||||
|
|
Loading…
Reference in New Issue
Block a user