Iterate over projects in show.sh
This commit is contained in:
parent
2730bda32b
commit
3884c24e48
@ -1,13 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "LXD REMOTE: $(lxc remote get-default)"
|
||||
set -eu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
lxc project list
|
||||
. ../defaults.sh
|
||||
|
||||
. ./remote_env.sh
|
||||
|
||||
|
||||
echo "Global Settings:"
|
||||
|
||||
lxc image list
|
||||
lxc storage list
|
||||
lxc storage volume list ss-base
|
||||
lxc image list
|
||||
lxc project list
|
||||
lxc network list
|
||||
lxc profile list
|
||||
lxc list
|
||||
|
||||
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"
|
||||
|
||||
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
|
||||
|
||||
lxc network list
|
||||
lxc profile list
|
||||
lxc list
|
||||
|
||||
done
|
Loading…
Reference in New Issue
Block a user