1
1
Fork 1

Mindor updates.

This commit is contained in:
Derek Smith 2023-03-23 16:34:25 -04:00
parent d35a882d8b
commit dc269fe29c
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
2 changed files with 13 additions and 6 deletions

View File

@ -23,14 +23,25 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
BITCOIN_CHAIN=$(echo "$NO_PARENS" | cut -d'|' -f2)
PROJECT_NAME="$PROJECT_PREFIX-$BITCOIN_CHAIN"
echo
echo
echo "Project: $PROJECT_NAME"
echo "----------------------"
if ! lxc info | grep "project:" | grep -q "$PROJECT_NAME"; then
if lxc project list | grep -q "$PROJECT_NAME"; then
lxc project switch "$PROJECT_NAME"
fi
fi
echo
echo " Networks:"
lxc network list
echo
echo " Profiles:"
lxc profile list
echo
echo " Instances (VMs):"
lxc list
echo
done

View File

@ -79,15 +79,11 @@ if ! lxc image list | grep -q "$UBUNTU_BASE_IMAGE_NAME"; then
lxc image import "$METADATA_FILE" "$IMAGE_FILE" --alias "$UBUNTU_BASE_IMAGE_NAME"
else
lxc image copy "images:$BASE_LXC_IMAGE" local: --alias "$UBUNTU_BASE_IMAGE_NAME" --vm --auto-update
mkdir -p "$SS_JAMMY_PATH"
lxc image export "$UBUNTU_BASE_IMAGE_NAME" "$SS_JAMMY_PATH" --vm
fi
fi
# export the image if it's not cached.
if [ ! -d "$SS_JAMMY_PATH" ]; then
mkdir "$SS_JAMMY_PATH"
lxc image export "$UBUNTU_BASE_IMAGE_NAME" "$SS_JAMMY_PATH" --vm
fi
# if the ss-mgmt doesn't exist, create it.
SSH_PUBKEY_PATH="$HOME/.ssh/id_rsa.pub"
if ! lxc list --format csv | grep -q ss-mgmt; then