2022-08-24 14:11:50 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-03-23 18:25:31 +00:00
|
|
|
set -eu
|
|
|
|
cd "$(dirname "$0")"
|
2023-03-09 20:36:30 +00:00
|
|
|
|
2023-03-23 18:25:31 +00:00
|
|
|
. ../defaults.sh
|
2023-03-09 20:36:30 +00:00
|
|
|
|
2023-03-23 18:25:31 +00:00
|
|
|
. ./remote_env.sh
|
|
|
|
|
|
|
|
|
|
|
|
echo "Global Settings:"
|
|
|
|
|
|
|
|
lxc image list
|
2023-02-01 19:44:05 +00:00
|
|
|
lxc storage list
|
2023-03-18 22:18:21 +00:00
|
|
|
lxc storage volume list ss-base
|
2023-03-23 18:25:31 +00:00
|
|
|
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
|
|
|
|
for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
|
|
|
|
NO_PARENS="${PROJECT_CHAIN:1:${#PROJECT_CHAIN}-2}"
|
|
|
|
PROJECT_PREFIX=$(echo "$NO_PARENS" | cut -d'|' -f1)
|
|
|
|
BITCOIN_CHAIN=$(echo "$NO_PARENS" | cut -d'|' -f2)
|
|
|
|
PROJECT_NAME="$PROJECT_PREFIX-$BITCOIN_CHAIN"
|
|
|
|
|
2023-03-23 20:34:25 +00:00
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo "Project: $PROJECT_NAME"
|
2023-03-24 21:10:04 +00:00
|
|
|
echo "----------------------------------------------------------"
|
2023-03-23 18:25:31 +00:00
|
|
|
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
|
|
|
|
|
2023-03-23 20:34:25 +00:00
|
|
|
echo " Networks:"
|
2023-03-23 18:25:31 +00:00
|
|
|
lxc network list
|
2023-03-23 20:34:25 +00:00
|
|
|
echo
|
|
|
|
echo " Profiles:"
|
2023-03-23 18:25:31 +00:00
|
|
|
lxc profile list
|
2023-03-23 20:34:25 +00:00
|
|
|
echo
|
|
|
|
echo " Instances (VMs):"
|
2023-03-23 18:25:31 +00:00
|
|
|
lxc list
|
2023-03-24 21:10:04 +00:00
|
|
|
echo "----------------------------------------------------------"
|
2023-03-23 18:25:31 +00:00
|
|
|
done
|