1
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) BITCOIN_CHAIN=$(echo "$NO_PARENS" | cut -d'|' -f2)
PROJECT_NAME="$PROJECT_PREFIX-$BITCOIN_CHAIN" 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 info | grep "project:" | grep -q "$PROJECT_NAME"; then
if lxc project list | grep -q "$PROJECT_NAME"; then if lxc project list | grep -q "$PROJECT_NAME"; then
lxc project switch "$PROJECT_NAME" lxc project switch "$PROJECT_NAME"
fi fi
fi fi
echo
echo " Networks:"
lxc network list lxc network list
echo
echo " Profiles:"
lxc profile list lxc profile list
echo
echo " Instances (VMs):"
lxc list lxc list
echo
done done

View File

@ -79,14 +79,10 @@ if ! lxc image list | grep -q "$UBUNTU_BASE_IMAGE_NAME"; then
lxc image import "$METADATA_FILE" "$IMAGE_FILE" --alias "$UBUNTU_BASE_IMAGE_NAME" lxc image import "$METADATA_FILE" "$IMAGE_FILE" --alias "$UBUNTU_BASE_IMAGE_NAME"
else else
lxc image copy "images:$BASE_LXC_IMAGE" local: --alias "$UBUNTU_BASE_IMAGE_NAME" --vm --auto-update lxc image copy "images:$BASE_LXC_IMAGE" local: --alias "$UBUNTU_BASE_IMAGE_NAME" --vm --auto-update
fi mkdir -p "$SS_JAMMY_PATH"
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 lxc image export "$UBUNTU_BASE_IMAGE_NAME" "$SS_JAMMY_PATH" --vm
fi fi
fi
# if the ss-mgmt doesn't exist, create it. # if the ss-mgmt doesn't exist, create it.
SSH_PUBKEY_PATH="$HOME/.ssh/id_rsa.pub" SSH_PUBKEY_PATH="$HOME/.ssh/id_rsa.pub"