Added MAC ADDRESS pinning.

Signed-off-by: Derek Smith <derek@farscapian.com>
This commit is contained in:
Derek Smith 2022-05-10 11:59:30 -04:00
parent 2c5ca80fcf
commit fb38fe23e6
Signed by: farscapian
GPG Key ID: 8F1CD799CCA516CC
4 changed files with 10 additions and 1 deletions

View File

@ -135,3 +135,7 @@ export NEXTCLOUD_DB_IMAGE="$DEFAULT_DB_IMAGE"
export GITEA_IMAGE="gitea/gitea:latest"
export GITEA_DB_IMAGE="$DEFAULT_DB_IMAGE"
export WWW_MAC_ADDRESS=
export BTCPAY_MAC_ADDRESS=
export UMBREL_MAC_ADDRESS=

View File

@ -60,6 +60,11 @@ elif [ "$VPS_HOSTING_TARGET" = lxd ]; then
export RUN_BACKUP=false
# create a base image if needed and instantiate a VM.
if [ -z "$MAC_ADDRESS_TO_PROVISION" ]; then
echo "ERROR: You MUST define a MAC Address for all your machines."
exit 1
fi
./provision_lxc.sh
fi

1
git
View File

@ -1 +0,0 @@
git

View File

@ -109,6 +109,7 @@ if ! lxc image list --format csv "$VM_NAME" | grep -q "$VM_NAME"; then
# let's PIN the HW address for now so we don't exhaust IP
# and so we can set DNS internally.
lxc config set "$VM_NAME" "volatile.enp5s0.hwaddr=$MAC_ADDRESS_TO_PROVISION"
lxc start "$VM_NAME"